@@ -21,7 +21,7 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * Register singleton. |
| 23 | 23 | */ |
| 24 | - $this->app->singleton('tzsk-payu', function ($app) { |
|
| 24 | + $this->app->singleton('tzsk-payu', function($app) { |
|
| 25 | 25 | return new PayuGateway(); |
| 26 | 26 | }); |
| 27 | 27 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | | These are the fields that are optional for making a payment. |
| 55 | 55 | | |
| 56 | 56 | */ |
| 57 | - 'optional_fields' => array_map(function ($i) { |
|
| 57 | + 'optional_fields' => array_map(function($i) { |
|
| 58 | 58 | return "udf{$i}"; |
| 59 | 59 | }, range(1, 10)), |
| 60 | 60 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | * Routes for payment. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -Route::group(['namespace' => 'Tzsk\Payu\Controllers', 'middleware' => ['web']], function () { |
|
| 6 | +Route::group(['namespace' => 'Tzsk\Payu\Controllers', 'middleware' => ['web']], function() { |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * Make the payment request. |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Tzsk\Payu; |
| 3 | 3 | |
| 4 | -use Illuminate\Support\Facades\Session; |
|
| 5 | 4 | use Tzsk\Payu\Helpers\Config; |
| 6 | 5 | use Tzsk\Payu\Helpers\Redirector; |
| 7 | 6 | use Tzsk\Payu\Helpers\Storage; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | protected $config; |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * @param array $transaction_ids |
|
| 21 | + * @param string $transaction_ids |
|
| 22 | 22 | * @param string $account |
| 23 | 23 | */ |
| 24 | 24 | public function __construct($transaction_ids, $account = null) |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $request = new Request((array) $data); |
| 41 | 41 | $attributes = (new Processor($request))->process(); |
| 42 | 42 | |
| 43 | - if($this->config->getDriver() == 'database') { |
|
| 43 | + if ($this->config->getDriver() == 'database') { |
|
| 44 | 44 | return PayuPayment::find($attributes); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | public function boot() |
| 54 | 54 | { |
| 55 | - if (! $this->account) { |
|
| 55 | + if (!$this->account) { |
|
| 56 | 56 | $this->account = config('payu.default'); |
| 57 | 57 | } |
| 58 | 58 | } |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | { |
| 50 | 50 | $this->request->replace($this->storage->getData()); |
| 51 | 51 | |
| 52 | - $redirect = collect($this->config->getRedirect())->map(function ($value) { |
|
| 52 | + $redirect = collect($this->config->getRedirect())->map(function($value) { |
|
| 53 | 53 | $separator = str_contains($value, '?') ? '&' : '?'; |
| 54 | - return url($value . $separator . '_token=' . csrf_token() . '&' . 'callback=' . $this->getStatusUrl()); |
|
| 54 | + return url($value.$separator.'_token='.csrf_token().'&'.'callback='.$this->getStatusUrl()); |
|
| 55 | 55 | })->all(); |
| 56 | 56 | |
| 57 | 57 | return array_merge( |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | protected function validateRequest() |
| 101 | 101 | { |
| 102 | - $validation = collect(array_flip($this->config->getRequiredFields()))->map(function () { |
|
| 102 | + $validation = collect(array_flip($this->config->getRequiredFields()))->map(function() { |
|
| 103 | 103 | return 'required'; |
| 104 | 104 | })->all(); |
| 105 | 105 | |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $attributes['account'] = $this->storage->getAccount(); |
| 94 | 94 | |
| 95 | 95 | $modelArray = $this->storage->getModel(); |
| 96 | - if (! empty($modelArray)) { |
|
| 96 | + if (!empty($modelArray)) { |
|
| 97 | 97 | $attributes['payable_id'] = $modelArray['id']; |
| 98 | 98 | $attributes['payable_type'] = $modelArray['class']; |
| 99 | 99 | } |
@@ -230,7 +230,7 @@ |
||
| 230 | 230 | */ |
| 231 | 231 | public function getPaymentUrl() |
| 232 | 232 | { |
| 233 | - return 'https://' . $this->prefix() . "." . $this->endpoint; |
|
| 233 | + return 'https://'.$this->prefix().".".$this->endpoint; |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | /** |