@@ -53,7 +53,7 @@ |
||
| 53 | 53 | protected $serviceVersion = null; |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * @param $requestChild |
|
| 56 | + * @param \SimpleXMLElement $requestChild |
|
| 57 | 57 | * @return mixed |
| 58 | 58 | */ |
| 59 | 59 | protected function prepareRequestXml($requestChild) |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | protected function getRequestXml() |
| 84 | 84 | { |
| 85 | - $serviceXmlNode = "<" . $this->getServiceName() . "/>"; |
|
| 86 | - $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>' . $serviceXmlNode); |
|
| 85 | + $serviceXmlNode = "<".$this->getServiceName()."/>"; |
|
| 86 | + $xml = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>'.$serviceXmlNode); |
|
| 87 | 87 | $xml->addAttribute('version', $this->getServiceVersion()); |
| 88 | 88 | |
| 89 | 89 | $bodyChild = $xml->addChild('body'); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $body = $httpResponse->getBody(true); |
| 160 | 160 | $xmlResponse = !empty($body) ? $httpResponse->xml() : ''; |
| 161 | 161 | |
| 162 | - if($xmlResponse instanceof \SimpleXMLElement) { |
|
| 162 | + if ($xmlResponse instanceof \SimpleXMLElement) { |
|
| 163 | 163 | $response = $xmlResponse->body->transaction; |
| 164 | 164 | |
| 165 | 165 | $response = json_decode(json_encode($response), true); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | throw new InvalidResponseException('Error communicating with payment gateway'); |
| 171 | 171 | } catch (\Exception $e) { |
| 172 | 172 | throw new InvalidResponseException( |
| 173 | - 'Error communicating with payment gateway: ' . $e->getMessage(), |
|
| 173 | + 'Error communicating with payment gateway: '.$e->getMessage(), |
|
| 174 | 174 | $e->getCode() |
| 175 | 175 | ); |
| 176 | 176 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | protected function getEndpoint() |
| 193 | 193 | { |
| 194 | 194 | $base = $this->getTestMode() ? $this->getApiBaseTestUrl() : $this->getApiBaseProdUrl(); |
| 195 | - return $base . '/' . $this->getApiEndpoint(); |
|
| 195 | + return $base.'/'.$this->getApiEndpoint(); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | return $this->data['error']['errorDetail']; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - if(isset($this->data['response'])) { |
|
| 99 | + if (isset($this->data['response'])) { |
|
| 100 | 100 | return $this->data['response']['responseMessage']; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -108,11 +108,11 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function getCode() |
| 110 | 110 | { |
| 111 | - if(isset($this->data['response'])) { |
|
| 111 | + if (isset($this->data['response'])) { |
|
| 112 | 112 | return $this->data['response']['responseCode']; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - if(isset($this->data['error'])) { |
|
| 115 | + if (isset($this->data['error'])) { |
|
| 116 | 116 | return $this->data['error']['errorCode']; |
| 117 | 117 | } |
| 118 | 118 | |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | return $data; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - /** |
|
| 121 | + /** |
|
| 122 | 122 | * @param $value |
| 123 | 123 | * |
| 124 | 124 | * @return static |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | |
| 93 | 93 | $requestType = $this->getRequestType(); |
| 94 | 94 | |
| 95 | - if(is_null($requestType)) { |
|
| 95 | + if (is_null($requestType)) { |
|
| 96 | 96 | $requestType = self::DATATRANS_REQUEST_TYPE_COA; |
| 97 | 97 | } |
| 98 | 98 | |