@@ -67,7 +67,7 @@ |
||
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | 69 | if (isset($this->invoice->getDetails()['customer_phone'])) { |
| 70 | - $data['customer_phone']=$this->invoice->getDetails()['customer_phone']; |
|
| 70 | + $data['customer_phone'] = $this->invoice->getDetails()['customer_phone']; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | $response = $this |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | public function __construct(Invoice $invoice, $settings) |
| 46 | 46 | { |
| 47 | 47 | $this->invoice($invoice); |
| 48 | - $this->settings = (object)$settings; |
|
| 48 | + $this->settings = (object) $settings; |
|
| 49 | 49 | $this->httpClientInit(); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function purchase() |
| 60 | 60 | { |
| 61 | 61 | $this->invoice->uuid(crc32($this->invoice->getUuid())); |
| 62 | - $token = $this->getToken(); |
|
| 62 | + $token = $this->getToken(); |
|
| 63 | 63 | $this->invoice->transactionId($token['Token']); |
| 64 | 64 | |
| 65 | 65 | return $this->invoice->getTransactionId(); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | { |
| 93 | 93 | $transaction_amount = Request::input('transactionAmount'); |
| 94 | 94 | |
| 95 | - if ($this->invoice->getAmount()*10 == $transaction_amount) { |
|
| 95 | + if ($this->invoice->getAmount() * 10 == $transaction_amount) { |
|
| 96 | 96 | $param = ['Token'=>Request::input('token'), 'RefNum'=>Request::input('RefNum')]; |
| 97 | 97 | $response = $this->client->post($this->settings->apiVerificationUrl, [ |
| 98 | 98 | 'json'=> array_merge( |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $response_data = json_decode($response->getBody()->getContents()); |
| 104 | 104 | if ($response_data->Result != 'erSucceed') { |
| 105 | 105 | throw new InvalidPaymentException($response_data->Result); |
| 106 | - } elseif ($this->invoice->getAmount()*10 != $response_data->Amount) { |
|
| 106 | + } elseif ($this->invoice->getAmount() * 10 != $response_data->Amount) { |
|
| 107 | 107 | $this->client->post( |
| 108 | 108 | $this->settings->apiReverseAmountUrl, |
| 109 | 109 | [ |
@@ -182,10 +182,10 @@ discard block |
||
| 182 | 182 | private function httpClientInit(): void |
| 183 | 183 | { |
| 184 | 184 | $this->client = new Client([ |
| 185 | - 'curl'=>[\CURLOPT_SSL_CIPHER_LIST=>'DEFAULT@SECLEVEL=1',], |
|
| 185 | + 'curl'=>[\CURLOPT_SSL_CIPHER_LIST=>'DEFAULT@SECLEVEL=1', ], |
|
| 186 | 186 | 'verify' => false, |
| 187 | 187 | 'base_uri' => $this->settings->baseUri, |
| 188 | - 'headers' => ['Content-Type' => 'application/json',], |
|
| 188 | + 'headers' => ['Content-Type' => 'application/json', ], |
|
| 189 | 189 | ]); |
| 190 | 190 | } |
| 191 | 191 | |