@@ -128,12 +128,10 @@ discard block |
||
| 128 | 128 | if ($this->directResponse || |
| 129 | 129 | $this->validationDirectResponseList || |
| 130 | 130 | isset($this->response->validationDirectResponse)) { |
| 131 | - $response = $this->directResponse ?: |
|
| 132 | - $this->validationDirectResponseList ?: |
|
| 133 | - $this->response->validationDirectResponse; |
|
| 131 | + $response = $this->directResponse ?: $this->validationDirectResponseList ?: $this->response->validationDirectResponse; |
|
| 134 | 132 | if (is_array($response)) { |
| 135 | 133 | $this->transactionInfoArray = array_map( |
| 136 | - static function ($r) { |
|
| 134 | + static function($r) { |
|
| 137 | 135 | return new TransactionResponse($r); |
| 138 | 136 | }, |
| 139 | 137 | $response |
@@ -152,12 +150,12 @@ discard block |
||
| 152 | 150 | */ |
| 153 | 151 | public function __toString() |
| 154 | 152 | { |
| 155 | - $output = '<table id="authnet-response">' . "\n"; |
|
| 156 | - $output .= '<caption>Authorize.Net Response</caption>' . "\n"; |
|
| 157 | - $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>' . "\n"; |
|
| 158 | - $output .= '<tr><td colspan="2"><pre>' . "\n"; |
|
| 159 | - $output .= $this->responseJson . "\n"; |
|
| 160 | - $output .= '</pre></td></tr>' . "\n"; |
|
| 153 | + $output = '<table id="authnet-response">'."\n"; |
|
| 154 | + $output .= '<caption>Authorize.Net Response</caption>'."\n"; |
|
| 155 | + $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>'."\n"; |
|
| 156 | + $output .= '<tr><td colspan="2"><pre>'."\n"; |
|
| 157 | + $output .= $this->responseJson."\n"; |
|
| 158 | + $output .= '</pre></td></tr>'."\n"; |
|
| 161 | 159 | $output .= '</table>'; |
| 162 | 160 | |
| 163 | 161 | return $output; |
@@ -233,9 +231,9 @@ discard block |
||
| 233 | 231 | protected function checkTransactionStatus(int $status): bool |
| 234 | 232 | { |
| 235 | 233 | if ($this->transactionInfo instanceof TransactionResponse) { |
| 236 | - $match = (int)$this->transactionInfo->getTransactionResponseField('ResponseCode') === $status; |
|
| 234 | + $match = (int) $this->transactionInfo->getTransactionResponseField('ResponseCode') === $status; |
|
| 237 | 235 | } else { |
| 238 | - $match = (int)$this->transactionResponse->responseCode === $status; |
|
| 236 | + $match = (int) $this->transactionResponse->responseCode === $status; |
|
| 239 | 237 | } |
| 240 | 238 | return $match; |
| 241 | 239 | } |