@@ -186,7 +186,7 @@ |
||
| 186 | 186 | private function setApiProviderConfiguration($credentials) |
| 187 | 187 | { |
| 188 | 188 | // Setting PayPal API Credentials |
| 189 | - collect($credentials[$this->mode])->map(function ($value, $key) { |
|
| 189 | + collect($credentials[$this->mode])->map(function($value, $key) { |
|
| 190 | 190 | $this->config[$key] = $value; |
| 191 | 191 | }); |
| 192 | 192 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | private function registerPayPal() |
| 56 | 56 | { |
| 57 | - $this->app->singleton('paypal_client', static function () { |
|
| 57 | + $this->app->singleton('paypal_client', static function() { |
|
| 58 | 58 | return new PayPalClient(); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $this->apiUrl = collect([$this->config['api_url'], $this->apiEndPoint])->implode('/'); |
| 23 | 23 | |
| 24 | 24 | $data = ['url' => $url]; |
| 25 | - $data['event_types'] = collect($events)->map(function ($item) { |
|
| 25 | + $data['event_types'] = collect($events)->map(function($item) { |
|
| 26 | 26 | return ['name' => $item]; |
| 27 | 27 | })->toArray(); |
| 28 | 28 | |
@@ -22,8 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function listTransactions(array $filters, $fields = 'all', $page = 1, $page_size = 100) |
| 24 | 24 | { |
| 25 | - $filters_list = collect($filters)->isEmpty() ? '' : |
|
| 26 | - collect($filters)->map(function ($value, $key) { |
|
| 25 | + $filters_list = collect($filters)->isEmpty() ? '' : collect($filters)->map(function($value, $key) { |
|
| 27 | 26 | return "{$key}={$value}&"; |
| 28 | 27 | })->implode(''); |
| 29 | 28 | |
@@ -84,18 +84,18 @@ |
||
| 84 | 84 | return $this->doPayPalRequest(); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - /** |
|
| 88 | - * Captures payment for an order. |
|
| 89 | - * |
|
| 90 | - * @param string $order_id |
|
| 91 | - * @param array $data |
|
| 92 | - * |
|
| 93 | - * @throws \Throwable |
|
| 94 | - * |
|
| 95 | - * @return array|\Psr\Http\Message\StreamInterface|string |
|
| 96 | - * |
|
| 97 | - * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture |
|
| 98 | - */ |
|
| 87 | + /** |
|
| 88 | + * Captures payment for an order. |
|
| 89 | + * |
|
| 90 | + * @param string $order_id |
|
| 91 | + * @param array $data |
|
| 92 | + * |
|
| 93 | + * @throws \Throwable |
|
| 94 | + * |
|
| 95 | + * @return array|\Psr\Http\Message\StreamInterface|string |
|
| 96 | + * |
|
| 97 | + * @see https://developer.paypal.com/docs/api/orders/v2/#orders_capture |
|
| 98 | + */ |
|
| 99 | 99 | public function capturePaymentOrder($order_id, array $data = []) |
| 100 | 100 | {
|
| 101 | 101 | $this->apiEndPoint = "v2/checkout/orders/{$order_id}/capture";
|