@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function pay($initializeCallback = null) |
125 | 125 | { |
126 | - if($initializeCallback) |
|
126 | + if ($initializeCallback) |
|
127 | 127 | call_user_func($initializeCallback, $this->driver); |
128 | 128 | |
129 | 129 | return $this->driver->pay(); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $this->validateDriver(); |
162 | 162 | $class = $this->config['map'][$this->driver]; |
163 | 163 | |
164 | - return new $class($this->invoice,$this->settings); |
|
164 | + return new $class($this->invoice, $this->settings); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -179,13 +179,13 @@ discard block |
||
179 | 179 | throw new DriverNotFoundException('Driver not found in config file. Try updating the package.'); |
180 | 180 | } |
181 | 181 | |
182 | - if (! class_exists($this->config['map'][$this->driver])) { |
|
182 | + if (!class_exists($this->config['map'][$this->driver])) { |
|
183 | 183 | throw new DriverNotFoundException('Driver source not found. Please update the package.'); |
184 | 184 | } |
185 | 185 | |
186 | 186 | $reflect = new \ReflectionClass($this->config['map'][$this->driver]); |
187 | 187 | |
188 | - if (! $reflect->implementsInterface(Contracts\DriverInterface::class)) { |
|
188 | + if (!$reflect->implementsInterface(Contracts\DriverInterface::class)) { |
|
189 | 189 | throw new \Exception("Driver must be an instance of Contracts\DriverInterface."); |
190 | 190 | } |
191 | 191 | } |
@@ -123,8 +123,9 @@ |
||
123 | 123 | */ |
124 | 124 | public function pay($initializeCallback = null) |
125 | 125 | { |
126 | - if($initializeCallback) |
|
127 | - call_user_func($initializeCallback, $this->driver); |
|
126 | + if($initializeCallback) { |
|
127 | + call_user_func($initializeCallback, $this->driver); |
|
128 | + } |
|
128 | 129 | |
129 | 130 | return $this->driver->pay(); |
130 | 131 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | | |
23 | 23 | */ |
24 | 24 | 'drivers' => [ |
25 | - 'zarinpal' => [ // set urls to https://sandbox.zarinpal.com/pg/rest/WebGate/ for using sandbox |
|
25 | + 'zarinpal' => [// set urls to https://sandbox.zarinpal.com/pg/rest/WebGate/ for using sandbox |
|
26 | 26 | 'apiPurchaseUrl' => 'https://www.zarinpal.com/pg/rest/WebGate/PaymentRequest.json', |
27 | 27 | 'apiPaymentUrl' => 'https://www.zarinpal.com/pg/StartPay/', |
28 | 28 | 'apiVerificationUrl' => 'https://www.zarinpal.com/pg/rest/WebGate/PaymentVerification.json', |
@@ -98,7 +98,7 @@ |
||
98 | 98 | */ |
99 | 99 | public function amount($amount) |
100 | 100 | { |
101 | - if (! is_int($amount)) { |
|
101 | + if (!is_int($amount)) { |
|
102 | 102 | throw new \Exception('Amount value should be an integer.'); |
103 | 103 | } |
104 | 104 | $this->amount = $amount; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | /** |
25 | 25 | * Bind to service container. |
26 | 26 | */ |
27 | - $this->app->bind('shetabit-payment', function () { |
|
27 | + $this->app->bind('shetabit-payment', function() { |
|
28 | 28 | return new PaymentManager(config('payment')); |
29 | 29 | }); |
30 | 30 | } |