@@ -68,6 +68,9 @@ |
||
68 | 68 | return $this->forKey("index" . $index); |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $key |
|
73 | + */ |
|
71 | 74 | public function forKey($key) |
72 | 75 | { |
73 | 76 | return isset($this->_nested[$key]) ? $this->_nested[$key] : null; |
@@ -17,6 +17,9 @@ discard block |
||
17 | 17 | $this->_config = $config; |
18 | 18 | } |
19 | 19 | |
20 | + /** |
|
21 | + * @param string $path |
|
22 | + */ |
|
20 | 23 | public function delete($path) |
21 | 24 | { |
22 | 25 | $response = $this->_doRequest('DELETE', $path); |
@@ -27,6 +30,9 @@ discard block |
||
27 | 30 | } |
28 | 31 | } |
29 | 32 | |
33 | + /** |
|
34 | + * @param string $path |
|
35 | + */ |
|
30 | 36 | public function get($path) |
31 | 37 | { |
32 | 38 | $response = $this->_doRequest('GET', $path); |
@@ -37,6 +43,9 @@ discard block |
||
37 | 43 | } |
38 | 44 | } |
39 | 45 | |
46 | + /** |
|
47 | + * @param string $path |
|
48 | + */ |
|
40 | 49 | public function post($path, $params = null) |
41 | 50 | { |
42 | 51 | $response = $this->_doRequest('POST', $path, $this->_buildXml($params)); |
@@ -48,6 +57,9 @@ discard block |
||
48 | 57 | } |
49 | 58 | } |
50 | 59 | |
60 | + /** |
|
61 | + * @param string $path |
|
62 | + */ |
|
51 | 63 | public function put($path, $params = null) |
52 | 64 | { |
53 | 65 | $response = $this->_doRequest('PUT', $path, $this->_buildXml($params)); |
@@ -96,11 +108,18 @@ discard block |
||
96 | 108 | $this->_useClientCredentials = true; |
97 | 109 | } |
98 | 110 | |
111 | + /** |
|
112 | + * @param string $httpVerb |
|
113 | + * @param string $requestBody |
|
114 | + */ |
|
99 | 115 | private function _doRequest($httpVerb, $path, $requestBody = null) |
100 | 116 | { |
101 | 117 | return $this->_doUrlRequest($httpVerb, $this->_config->baseUrl() . $path, $requestBody); |
102 | 118 | } |
103 | 119 | |
120 | + /** |
|
121 | + * @param string $url |
|
122 | + */ |
|
104 | 123 | public function _doUrlRequest($httpVerb, $url, $requestBody = null) |
105 | 124 | { |
106 | 125 | $curl = curl_init(); |
@@ -7,6 +7,9 @@ discard block |
||
7 | 7 | private $_config; |
8 | 8 | private $_http; |
9 | 9 | |
10 | + /** |
|
11 | + * @param Gateway $gateway |
|
12 | + */ |
|
10 | 13 | public function __construct($gateway) |
11 | 14 | { |
12 | 15 | $this->_gateway = $gateway; |
@@ -119,6 +122,9 @@ discard block |
||
119 | 122 | ]; |
120 | 123 | } |
121 | 124 | |
125 | + /** |
|
126 | + * @param string $subPath |
|
127 | + */ |
|
122 | 128 | public function _doCreate($subPath, $params) |
123 | 129 | { |
124 | 130 | $fullPath = $this->_config->merchantPath() . $subPath; |
@@ -127,6 +133,9 @@ discard block |
||
127 | 133 | return $this->_verifyGatewayResponse($response); |
128 | 134 | } |
129 | 135 | |
136 | + /** |
|
137 | + * @param string $subPath |
|
138 | + */ |
|
130 | 139 | private function _doUpdate($subPath, $params) |
131 | 140 | { |
132 | 141 | $fullPath = $this->_config->merchantPath() . $subPath; |
@@ -15,6 +15,9 @@ discard block |
||
15 | 15 | private $_config; |
16 | 16 | private $_http; |
17 | 17 | |
18 | + /** |
|
19 | + * @param Gateway $gateway |
|
20 | + */ |
|
18 | 21 | public function __construct($gateway) |
19 | 22 | { |
20 | 23 | $this->_gateway = $gateway; |
@@ -73,6 +76,9 @@ discard block |
||
73 | 76 | } |
74 | 77 | } |
75 | 78 | |
79 | + /** |
|
80 | + * @param Result\Error $result |
|
81 | + */ |
|
76 | 82 | public function _mapError($result) |
77 | 83 | { |
78 | 84 | $error = $result->errors->deepAll()[0]; |
@@ -88,12 +94,18 @@ discard block |
||
88 | 94 | return $result; |
89 | 95 | } |
90 | 96 | |
97 | + /** |
|
98 | + * @param Result\Successful $result |
|
99 | + */ |
|
91 | 100 | public function _mapAccessTokenRevokeSuccess($result) |
92 | 101 | { |
93 | 102 | $result->revocationResult = $result->success; |
94 | 103 | return $result; |
95 | 104 | } |
96 | 105 | |
106 | + /** |
|
107 | + * @param Result\Successful $result |
|
108 | + */ |
|
97 | 109 | public function _mapSuccess($result) |
98 | 110 | { |
99 | 111 | $credentials = $result->credentials; |
@@ -114,6 +126,9 @@ discard block |
||
114 | 126 | return $url . '&signature=' . $this->computeSignature($url) . '&algorithm=SHA256'; |
115 | 127 | } |
116 | 128 | |
129 | + /** |
|
130 | + * @param string $url |
|
131 | + */ |
|
117 | 132 | public function computeSignature($url) |
118 | 133 | { |
119 | 134 | $key = hash('sha256', $this->_config->getClientSecret(), true); |
@@ -27,6 +27,9 @@ discard block |
||
27 | 27 | private $_config; |
28 | 28 | private $_http; |
29 | 29 | |
30 | + /** |
|
31 | + * @param Gateway $gateway |
|
32 | + */ |
|
30 | 33 | public function __construct($gateway) |
31 | 34 | { |
32 | 35 | $this->_gateway = $gateway; |
@@ -118,6 +121,7 @@ discard block |
||
118 | 121 | * @ignore |
119 | 122 | * @param string $subPath |
120 | 123 | * @param array $params |
124 | + * @param string $httpVerb |
|
121 | 125 | * @return mixed |
122 | 126 | */ |
123 | 127 | private function _doUpdate($httpVerb, $subPath, $params) |
@@ -160,7 +164,6 @@ discard block |
||
160 | 164 | * verifies that a valid paypal account identifier is being used |
161 | 165 | * @ignore |
162 | 166 | * @param string $identifier |
163 | - * @param Optional $string $identifierType type of identifier supplied, default 'token' |
|
164 | 167 | * @throws InvalidArgumentException |
165 | 168 | */ |
166 | 169 | private function _validateId($identifier = null, $identifierType = 'token') |
@@ -44,7 +44,7 @@ |
||
44 | 44 | /** |
45 | 45 | * @ignore |
46 | 46 | * @param array|null $objsToReturn |
47 | - * @param array|null $propertyNames |
|
47 | + * @param string $propertyNames |
|
48 | 48 | */ |
49 | 49 | public function __construct($objsToReturn = [], $propertyNames = []) |
50 | 50 | { |
@@ -16,9 +16,7 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * settle a transaction by id in sandbox |
18 | 18 | * |
19 | - * @param string $id transaction id |
|
20 | - * @param Configuration $config gateway config |
|
21 | - * @return Transaction |
|
19 | + * @return \Braintree\Transaction |
|
22 | 20 | */ |
23 | 21 | public static function settle($transactionId) |
24 | 22 | { |
@@ -28,9 +26,7 @@ discard block |
||
28 | 26 | /** |
29 | 27 | * settlement confirm a transaction by id in sandbox |
30 | 28 | * |
31 | - * @param string $id transaction id |
|
32 | - * @param Configuration $config gateway config |
|
33 | - * @return Transaction |
|
29 | + * @return \Braintree\Transaction |
|
34 | 30 | */ |
35 | 31 | public static function settlementConfirm($transactionId) |
36 | 32 | { |
@@ -40,9 +36,7 @@ discard block |
||
40 | 36 | /** |
41 | 37 | * settlement decline a transaction by id in sandbox |
42 | 38 | * |
43 | - * @param string $id transaction id |
|
44 | - * @param Configuration $config gateway config |
|
45 | - * @return Transaction |
|
39 | + * @return \Braintree\Transaction |
|
46 | 40 | */ |
47 | 41 | public static function settlementDecline($transactionId) |
48 | 42 | { |
@@ -52,9 +46,7 @@ discard block |
||
52 | 46 | /** |
53 | 47 | * settlement pending a transaction by id in sandbox |
54 | 48 | * |
55 | - * @param string $id transaction id |
|
56 | - * @param Configuration $config gateway config |
|
57 | - * @return Transaction |
|
49 | + * @return \Braintree\Transaction |
|
58 | 50 | */ |
59 | 51 | public static function settlementPending($transactionId) |
60 | 52 | { |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | } |
434 | 434 | } |
435 | 435 | |
436 | - /** @return void|Braintree\Customer */ |
|
436 | + /** @return null|Customer */ |
|
437 | 437 | public function vaultCustomer() |
438 | 438 | { |
439 | 439 | $customerId = $this->customerDetails->id; |
@@ -507,6 +507,9 @@ discard block |
||
507 | 507 | return Configuration::gateway()->transaction()->saleNoValidate($attribs); |
508 | 508 | } |
509 | 509 | |
510 | + /** |
|
511 | + * @param MultipleValueNode[] $query |
|
512 | + */ |
|
510 | 513 | public static function search($query) |
511 | 514 | { |
512 | 515 | return Configuration::gateway()->transaction()->search($query); |
@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | private $_config; |
24 | 24 | private $_http; |
25 | 25 | |
26 | + /** |
|
27 | + * @param Gateway $gateway |
|
28 | + */ |
|
26 | 29 | public function __construct($gateway) |
27 | 30 | { |
28 | 31 | $this->_gateway = $gateway; |
@@ -65,7 +68,6 @@ discard block |
||
65 | 68 | * |
66 | 69 | * @deprecated since version 2.3.0 |
67 | 70 | * @access public |
68 | - * @param array $attribs |
|
69 | 71 | * @return object |
70 | 72 | */ |
71 | 73 | public function createFromTransparentRedirect($queryString) |
@@ -304,7 +306,6 @@ discard block |
||
304 | 306 | * For more detailed information and examples, see {@link http://www.braintreepayments.com/gateway/transaction-api#searching http://www.braintreepaymentsolutions.com/gateway/transaction-api} |
305 | 307 | * |
306 | 308 | * @param mixed $query search query |
307 | - * @param array $options options such as page number |
|
308 | 309 | * @return ResourceCollection |
309 | 310 | * @throws InvalidArgumentException |
310 | 311 | */ |
@@ -349,7 +350,6 @@ discard block |
||
349 | 350 | /** |
350 | 351 | * void a transaction by id |
351 | 352 | * |
352 | - * @param string $id transaction id |
|
353 | 353 | * @return Result\Successful|Result\Error |
354 | 354 | */ |
355 | 355 | public function void($transactionId) |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | * sends the create request to the gateway |
458 | 458 | * |
459 | 459 | * @ignore |
460 | - * @param var $subPath |
|
460 | + * @param string $subPath |
|
461 | 461 | * @param array $params |
462 | 462 | * @return mixed |
463 | 463 | */ |