Passed
Pull Request — master (#127)
by
unknown
02:37
created
src/Drivers/Fanavacard/Fanavacard.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -132,15 +132,15 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $receipt = new Receipt('fanavacard', $referenceId);
134 134
         $receipt->detail([
135
-                             'ResNum'=>Request::input('ResNum'),
136
-                             'RefNum'=>Request::input('RefNum'),
137
-                             'token'=>Request::input('token'),
138
-                             'CustomerRefNum'=>Request::input('CustomerRefNum'),
139
-                             'CardMaskPan'=>Request::input('CardMaskPan'),
140
-                             'transactionAmount'=>Request::input('transactionAmount'),
141
-                             'emailAddress'=>Request::input('emailAddress'),
142
-                             'mobileNo'=>Request::input('mobileNo'),
143
-                         ]);
135
+                                'ResNum'=>Request::input('ResNum'),
136
+                                'RefNum'=>Request::input('RefNum'),
137
+                                'token'=>Request::input('token'),
138
+                                'CustomerRefNum'=>Request::input('CustomerRefNum'),
139
+                                'CardMaskPan'=>Request::input('CardMaskPan'),
140
+                                'transactionAmount'=>Request::input('transactionAmount'),
141
+                                'emailAddress'=>Request::input('emailAddress'),
142
+                                'mobileNo'=>Request::input('mobileNo'),
143
+                            ]);
144 144
         return $receipt;
145 145
     }
146 146
 
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
 
174 174
     private function httpClientInit(): void {
175 175
         $this->client = new Client([
176
-                                       'curl'=>[\CURLOPT_SSL_CIPHER_LIST=>'DEFAULT@SECLEVEL=1',],
177
-                                       'verify' => false,
178
-                                       'base_uri' => $this->settings->baseUri,
179
-                                       'headers' => ['Content-Type' => 'application/json',],
180
-                                   ]);
176
+                                        'curl'=>[\CURLOPT_SSL_CIPHER_LIST=>'DEFAULT@SECLEVEL=1',],
177
+                                        'verify' => false,
178
+                                        'base_uri' => $this->settings->baseUri,
179
+                                        'headers' => ['Content-Type' => 'application/json',],
180
+                                    ]);
181 181
     }
182 182
 
183 183
     private function getWsContext(): array {
Please login to merge, or discard this patch.
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             $response_data = json_decode($response->getBody()->getContents());
103 103
             if($response_data->Result != 'erSucceed'){
104 104
                 return throw new InvalidPaymentException($response_data->Result);
105
-            }elseif($this->invoice->getAmount()*10 != $response_data->Amount){
105
+            } elseif($this->invoice->getAmount()*10 != $response_data->Amount){
106 106
                 $response = $this->client->post($this->settings->apiReverseAmountUrl,
107 107
                                                 [
108 108
                                                     'json'=> [
@@ -161,12 +161,14 @@  discard block
 block discarded – undo
161 161
                 'RedirectUrl'=>$this->settings->callbackUrl,
162 162
             ]]);
163 163
 
164
-        if($response->getStatusCode() != 200)
165
-            return throw new PurchaseFailedException("cant get token |  $response->getBody()->getContents()", $response->getStatusCode());
164
+        if($response->getStatusCode() != 200) {
165
+                    return throw new PurchaseFailedException("cant get token |  $response->getBody()->getContents()", $response->getStatusCode());
166
+        }
166 167
 
167 168
         $response_data = json_decode($response->getBody()->getContents());
168
-        if($response_data->Result != 'erSucceed')
169
-            return throw new PurchaseFailedException("cant get token |  $response->getBody()->getContents()", $response->getStatusCode());
169
+        if($response_data->Result != 'erSucceed') {
170
+                    return throw new PurchaseFailedException("cant get token |  $response->getBody()->getContents()", $response->getStatusCode());
171
+        }
170 172
 
171 173
         return (array) $response_data;
172 174
     }
Please login to merge, or discard this patch.