@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $aParsedRequestUrl = parse_url($sRequestUrl); |
| 97 | 97 | |
| 98 | 98 | if ($aParsedRequestUrl === false) { |
| 99 | - throw new \Exception("Malformed URL " . $sRequestUrl); |
|
| 99 | + throw new \Exception("Malformed URL ".$sRequestUrl); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $aResponse = []; |
@@ -130,9 +130,9 @@ discard block |
||
| 130 | 130 | foreach ($aResponse as $iLinenum => $sLine) {// go through line by line |
| 131 | 131 | $iPos = strpos($sLine, "="); |
| 132 | 132 | if ($iPos > 0) {// is a "=" as delimiter existing? |
| 133 | - $aOutput[substr($sLine, 0, $iPos)] = trim(substr($sLine, $iPos+1)); |
|
| 133 | + $aOutput[substr($sLine, 0, $iPos)] = trim(substr($sLine, $iPos + 1)); |
|
| 134 | 134 | } elseif (!empty($sLine)) {// is line not empty? |
| 135 | - $aOutput[$iLinenum] = $sLine;// add the line unedited |
|
| 135 | + $aOutput[$iLinenum] = $sLine; // add the line unedited |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | } |
@@ -172,11 +172,11 @@ discard block |
||
| 172 | 172 | public function addPayoneOrderData(SalesOrder $oOrder, $aRequest, $aResponse) |
| 173 | 173 | { |
| 174 | 174 | if (isset($aResponse['txid'])) {// txid existing? |
| 175 | - $oOrder->setPayoneTxid($aResponse['txid']);// add txid to order entity |
|
| 175 | + $oOrder->setPayoneTxid($aResponse['txid']); // add txid to order entity |
|
| 176 | 176 | } |
| 177 | - $oOrder->setPayoneRefnr($aRequest['reference']);// add refnr to order entity |
|
| 178 | - $oOrder->setPayoneAuthmode($aRequest['request']);// add authmode to order entity |
|
| 179 | - $oOrder->setPayoneMode($aRequest['mode']);// add payone mode to order entity |
|
| 177 | + $oOrder->setPayoneRefnr($aRequest['reference']); // add refnr to order entity |
|
| 178 | + $oOrder->setPayoneAuthmode($aRequest['request']); // add authmode to order entity |
|
| 179 | + $oOrder->setPayoneMode($aRequest['mode']); // add payone mode to order entity |
|
| 180 | 180 | if (isset($aRequest['mandate_identification'])) {// mandate id existing in request? |
| 181 | 181 | $oOrder->setPayoneMandateId($aRequest['mandate_identification']); |
| 182 | 182 | } elseif (isset($aResponse['mandate_identification'])) {// mandate id existing in response? |
@@ -192,11 +192,11 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function isInvoiceDataNeeded(PayoneMethod $oPayment) |
| 194 | 194 | { |
| 195 | - $sType = $this->getConfigParam('request_type');// auth or preauth? |
|
| 196 | - $blInvoiceEnabled = (bool)$this->getConfigParam('transmit_enabled', 'invoicing');// invoicing enabled? |
|
| 195 | + $sType = $this->getConfigParam('request_type'); // auth or preauth? |
|
| 196 | + $blInvoiceEnabled = (bool)$this->getConfigParam('transmit_enabled', 'invoicing'); // invoicing enabled? |
|
| 197 | 197 | if ($oPayment->needsProductInfo() || ($sType == PayoneConfig::REQUEST_TYPE_AUTHORIZATION && $blInvoiceEnabled)) { |
| 198 | - return true;// invoice data needed |
|
| 198 | + return true; // invoice data needed |
|
| 199 | 199 | } |
| 200 | - return false;// invoice data not needed |
|
| 200 | + return false; // invoice data not needed |
|
| 201 | 201 | } |
| 202 | 202 | } |