@@ -53,17 +53,17 @@ |
||
| 53 | 53 | public function purchase() |
| 54 | 54 | { |
| 55 | 55 | $context = stream_context_create( |
| 56 | - [ |
|
| 57 | - 'ssl' => array( |
|
| 58 | - 'verify_peer' => false, |
|
| 59 | - 'verify_peer_name' => false |
|
| 60 | - ) |
|
| 61 | - ] |
|
| 62 | - ); |
|
| 56 | + [ |
|
| 57 | + 'ssl' => array( |
|
| 58 | + 'verify_peer' => false, |
|
| 59 | + 'verify_peer_name' => false |
|
| 60 | + ) |
|
| 61 | + ] |
|
| 62 | + ); |
|
| 63 | 63 | $soap = new \SoapClient($this->settings->apiPurchaseUrl); |
| 64 | 64 | $response = $soap->bpPayRequest($this->preparePurchaseData(), [ |
| 65 | - 'stream_context' => $context |
|
| 66 | - ]); |
|
| 65 | + 'stream_context' => $context |
|
| 66 | + ]); |
|
| 67 | 67 | |
| 68 | 68 | // fault has happened in bank gateway |
| 69 | 69 | if ($response->return == 21) { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function __construct(Invoice $invoice, $settings) |
| 39 | 39 | { |
| 40 | 40 | $this->invoice($invoice); |
| 41 | - $this->settings = (object)$settings; |
|
| 41 | + $this->settings = (object) $settings; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ] |
| 62 | 62 | ); |
| 63 | 63 | $soap = new \SoapClient($this->settings->apiPurchaseUrl); |
| 64 | - $response = $soap->bpPayRequest($this->preparePurchaseData(), [ |
|
| 64 | + $response = $soap->bpPayRequest($this->preparePurchaseData(), [ |
|
| 65 | 65 | 'stream_context' => $context |
| 66 | 66 | ]); |
| 67 | 67 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | // purchase was not successful |
| 76 | 76 | if ($data[0] != "0") { |
| 77 | - throw new PurchaseFailedException($this->translateStatus($data[0]), (int)$data[0]); |
|
| 77 | + throw new PurchaseFailedException($this->translateStatus($data[0]), (int) $data[0]); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $this->invoice->transactionId($data[1]); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $soap = new \SoapClient($this->settings->apiVerificationUrl); |
| 124 | 124 | |
| 125 | 125 | // step1: verify request |
| 126 | - $verifyResponse = (int)$soap->bpVerifyRequest($data)->return; |
|
| 126 | + $verifyResponse = (int) $soap->bpVerifyRequest($data)->return; |
|
| 127 | 127 | if ($verifyResponse != 0) { |
| 128 | 128 | // rollback money and throw exception |
| 129 | 129 | // avoid rollback if request was already verified |