@@ -87,7 +87,7 @@ |
||
87 | 87 | $sXml = $this->configExport->generateConfigExportXml(); |
88 | 88 | if ($sXml !== false) { |
89 | 89 | $oResultRaw->setHeader("Content-Type", "text/xml; charset=\"utf8\"", true); |
90 | - $oResultRaw->setHeader("Content-Disposition", "attachment; filename=\"payone_config_export" . date('Y-m-d H-i-s') . "_" . md5($sXml) . ".xml\"", true); |
|
90 | + $oResultRaw->setHeader("Content-Disposition", "attachment; filename=\"payone_config_export".date('Y-m-d H-i-s')."_".md5($sXml).".xml\"", true); |
|
91 | 91 | $oResultRaw->setContents($sXml); |
92 | 92 | } |
93 | 93 | } catch (\Exception $e) { |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | { |
136 | 136 | $sErrorMessage = false; |
137 | 137 | if (isset($aResponsePreCheck['status']) && $aResponsePreCheck['status'] == 'ERROR') { |
138 | - $sErrorMessage = __($aResponsePreCheck['errorcode'] . ' - ' . $aResponsePreCheck['customermessage']); |
|
138 | + $sErrorMessage = __($aResponsePreCheck['errorcode'].' - '.$aResponsePreCheck['customermessage']); |
|
139 | 139 | } elseif (isset($aResponseCalculation['status']) && $aResponseCalculation['status'] == 'ERROR') { |
140 | - $sErrorMessage = __($aResponseCalculation['errorcode'] . ' - ' . $aResponseCalculation['customermessage']); |
|
140 | + $sErrorMessage = __($aResponseCalculation['errorcode'].' - '.$aResponseCalculation['customermessage']); |
|
141 | 141 | } elseif (!$aResponsePreCheck || (isset($aResponsePreCheck['status']) && $aResponsePreCheck['status'] == 'OK' && !$aResponseCalculation)) { |
142 | 142 | $sErrorMessage = __('An unknown error occurred'); |
143 | 143 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | public function getPayDataArray($aResponse) |
191 | 191 | { |
192 | 192 | $aPayData = array(); |
193 | - foreach($aResponse as $sKey => $sValue) { |
|
193 | + foreach ($aResponse as $sKey => $sValue) { |
|
194 | 194 | $sCorrectedKey = str_ireplace('add_paydata[', '', $sKey); |
195 | 195 | $sCorrectedKey = rtrim($sCorrectedKey, ']'); |
196 | 196 | $sCorrectedKey = strtolower($sCorrectedKey); |
@@ -215,18 +215,18 @@ discard block |
||
215 | 215 | $aPayData = $this->getPayDataArray($aResponse); |
216 | 216 | foreach ($aPayData as $sKey => $sValue) { |
217 | 217 | $aSplit = explode('_', $sKey); |
218 | - for($i = count($aSplit); $i > 0; $i--) { |
|
219 | - if($i == count($aSplit)) { |
|
220 | - $aTmp = array($aSplit[$i-1] => $sValue); |
|
218 | + for ($i = count($aSplit); $i > 0; $i--) { |
|
219 | + if ($i == count($aSplit)) { |
|
220 | + $aTmp = array($aSplit[$i - 1] => $sValue); |
|
221 | 221 | } else { |
222 | - $aTmp = array($aSplit[$i-1] => $aTmp); |
|
222 | + $aTmp = array($aSplit[$i - 1] => $aTmp); |
|
223 | 223 | } |
224 | 224 | } |
225 | 225 | |
226 | 226 | $aInstallmentData = array_replace_recursive($aInstallmentData, $aTmp); |
227 | 227 | } |
228 | 228 | |
229 | - if(isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) { |
|
229 | + if (isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) { |
|
230 | 230 | return $aInstallmentData['paymentdetails']; |
231 | 231 | } |
232 | 232 |
@@ -234,7 +234,7 @@ |
||
234 | 234 | { |
235 | 235 | if (fmod(floatval($dItemAmount), 1.0) > 0) { // input does not represent an integer |
236 | 236 | $sErrorMessage = "Unable to use floating point values for item amounts! Parameter was: "; |
237 | - throw new \InvalidArgumentException($sErrorMessage . strval($dItemAmount), 1); |
|
237 | + throw new \InvalidArgumentException($sErrorMessage.strval($dItemAmount), 1); |
|
238 | 238 | } else { // return the integer value |
239 | 239 | return intval($dItemAmount); |
240 | 240 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | // order is not guaranteed to exist if using transaction status forwarding |
90 | 90 | // advance payment should not create an invoice |
91 | - if (null === $oOrder || $oOrder->getPayment()->getMethodInstance()->getCode() == PayoneConfig::METHOD_ADVANCE_PAYMENT){ |
|
91 | + if (null === $oOrder || $oOrder->getPayment()->getMethodInstance()->getCode() == PayoneConfig::METHOD_ADVANCE_PAYMENT) { |
|
92 | 92 | return; |
93 | 93 | } |
94 | 94 |