1 | <?php |
||
11 | trait PayPalRequest |
||
12 | { |
||
13 | /** |
||
14 | * @var HttpClient |
||
15 | */ |
||
16 | private $client; |
||
17 | |||
18 | /** |
||
19 | * @var \Illuminate\Support\Collection |
||
20 | */ |
||
21 | protected $post; |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $config; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $currency; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $options; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $paymentAction; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | private $locale; |
||
47 | |||
48 | /** |
||
49 | * Function To Set PayPal API Configuration. |
||
50 | * |
||
51 | * @return void |
||
52 | */ |
||
53 | private function setConfig() |
||
67 | |||
68 | /** |
||
69 | * Function to initialize Http Client. |
||
70 | * |
||
71 | * @return HttpClient |
||
72 | */ |
||
73 | protected function setClient() |
||
81 | |||
82 | /** |
||
83 | * Set PayPal API Credentials. |
||
84 | * |
||
85 | * @param array $credentials |
||
86 | * @param string $mode |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | public function setApiCredentials($credentials, $mode = '') |
||
133 | |||
134 | /** |
||
135 | * Setup request data to be sent to PayPal. |
||
136 | * |
||
137 | * @param array $data |
||
138 | * @return $this |
||
139 | */ |
||
140 | protected function setRequestData(array $data = []) |
||
150 | |||
151 | /** |
||
152 | * Set other/override PayPal API parameters. |
||
153 | * |
||
154 | * @param array $options |
||
155 | * |
||
156 | * @return $this |
||
157 | */ |
||
158 | public function addOptions(array $options) |
||
164 | |||
165 | /** |
||
166 | * Set ExpressCheckout API endpoints & options. |
||
167 | * |
||
168 | * @param array $credentials |
||
169 | * @param string $mode |
||
170 | * |
||
171 | * @return void |
||
172 | */ |
||
173 | protected function setExpressCheckoutOptions($credentials, $mode) |
||
193 | |||
194 | /** |
||
195 | * Set AdaptivePayments API endpoints & options. |
||
196 | * |
||
197 | * @param string $mode |
||
198 | * |
||
199 | * @return void |
||
200 | */ |
||
201 | protected function setAdaptivePaymentsOptions($mode) |
||
211 | |||
212 | /** |
||
213 | * Function to set currency. |
||
214 | * |
||
215 | * @param string $currency |
||
216 | * |
||
217 | * @throws \Exception |
||
218 | * |
||
219 | * @return $this |
||
220 | */ |
||
221 | public function setCurrency($currency = 'USD') |
||
234 | |||
235 | /** |
||
236 | * Retrieve PayPal IPN Response. |
||
237 | * |
||
238 | * @param array $post |
||
239 | * |
||
240 | * @return array |
||
241 | */ |
||
242 | public function verifyIPN($post) |
||
248 | |||
249 | /** |
||
250 | * Refund PayPal Transaction. |
||
251 | * |
||
252 | * @param string $transaction |
||
253 | * |
||
254 | * @return array |
||
255 | */ |
||
256 | public function refundTransaction($transaction) |
||
264 | |||
265 | /** |
||
266 | * Search Transactions On PayPal. |
||
267 | * |
||
268 | * @param array $post |
||
269 | * |
||
270 | * @return array |
||
271 | */ |
||
272 | public function searchTransactions($post) |
||
278 | |||
279 | /** |
||
280 | * Function To Perform PayPal API Request. |
||
281 | * |
||
282 | * @param string $method |
||
283 | * |
||
284 | * @throws \Exception |
||
285 | * |
||
286 | * @return array|\Psr\Http\Message\StreamInterface |
||
287 | */ |
||
288 | private function doPayPalRequest($method) |
||
350 | |||
351 | /** |
||
352 | * Parse PayPal NVP Response. |
||
353 | * |
||
354 | * @param string $request |
||
355 | * @param array $response |
||
356 | * |
||
357 | * @return array |
||
358 | */ |
||
359 | private function retrieveData($request, array $response = null) |
||
365 | } |
||
366 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..