1 | <?php |
||
11 | class PaymentGatewayController extends Controller{ |
||
12 | |||
13 | private static $allowed_actions = array( |
||
14 | 'endpoint' |
||
15 | ); |
||
16 | |||
17 | /** |
||
18 | * Generate an absolute url for gateways to return to, or send requests to. |
||
19 | * @param string $action the intended action of the gateway |
||
20 | * @param string $identifier the unique payment id |
||
21 | * @return string the resulting redirect url |
||
22 | */ |
||
23 | public static function getEndpointUrl($action, $identifier) |
||
29 | |||
30 | /** |
||
31 | * Generate an absolute url for gateways to return to, or send requests to. |
||
32 | * @param GatewayMessage $message message that redirect applies to. |
||
|
|||
33 | * @param string $action the intended action of the gateway |
||
34 | * @param string $returnurl the application url to re-redirect to |
||
35 | * @return string the resulting redirect url |
||
36 | * @deprecated 3.0 Snake-case methods will be deprecated with 3.0, use getEndpointUrl |
||
37 | */ |
||
38 | public static function get_endpoint_url($action, $identifier) { |
||
42 | |||
43 | /** |
||
44 | * The main action for handling all requests. |
||
45 | * It will redirect back to the application in all cases, |
||
46 | * but will not update the Payment/Transaction models if they are not found, |
||
47 | * or allowed to be updated. |
||
48 | */ |
||
49 | public function index() { |
||
94 | |||
95 | /** |
||
96 | * Get the the payment according to the identifer given in the url |
||
97 | * @return Payament the payment |
||
98 | */ |
||
99 | private function getPayment() { |
||
105 | |||
106 | /** |
||
107 | * Get the success url to redirect to. |
||
108 | * If a url hasn't been stored, then redirect to base url. |
||
109 | * @return string the url |
||
110 | */ |
||
111 | private function getSuccessUrl($message) { |
||
114 | |||
115 | /** |
||
116 | * Get the failure url to redirect to. |
||
117 | * If a url hasn't been stored, then redirect to base url. |
||
118 | * @return string the url |
||
119 | */ |
||
120 | private function getFailureUrl($message) { |
||
123 | |||
124 | } |
||
125 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.