@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | foreach ($aResponse as $iLinenum => $sLine) {// go through line by line |
130 | 130 | $iPos = strpos($sLine, "="); |
131 | 131 | if ($iPos > 0) {// is a "=" as delimiter existing? |
132 | - $aOutput[substr($sLine, 0, $iPos)] = trim(substr($sLine, $iPos+1)); |
|
132 | + $aOutput[substr($sLine, 0, $iPos)] = trim(substr($sLine, $iPos + 1)); |
|
133 | 133 | } elseif (!empty($sLine)) {// is line not empty? |
134 | - $aOutput[$iLinenum] = $sLine;// add the line unedited |
|
134 | + $aOutput[$iLinenum] = $sLine; // add the line unedited |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | } |
@@ -171,11 +171,11 @@ discard block |
||
171 | 171 | public function addPayoneOrderData(SalesOrder $oOrder, $aRequest, $aResponse) |
172 | 172 | { |
173 | 173 | if (isset($aResponse['txid'])) {// txid existing? |
174 | - $oOrder->setPayoneTxid($aResponse['txid']);// add txid to order entity |
|
174 | + $oOrder->setPayoneTxid($aResponse['txid']); // add txid to order entity |
|
175 | 175 | } |
176 | - $oOrder->setPayoneRefnr($aRequest['reference']);// add refnr to order entity |
|
177 | - $oOrder->setPayoneAuthmode($aRequest['request']);// add authmode to order entity |
|
178 | - $oOrder->setPayoneMode($aRequest['mode']);// add payone mode to order entity |
|
176 | + $oOrder->setPayoneRefnr($aRequest['reference']); // add refnr to order entity |
|
177 | + $oOrder->setPayoneAuthmode($aRequest['request']); // add authmode to order entity |
|
178 | + $oOrder->setPayoneMode($aRequest['mode']); // add payone mode to order entity |
|
179 | 179 | if (isset($aRequest['mandate_identification'])) {// mandate id existing in request? |
180 | 180 | $oOrder->setPayoneMandateId($aRequest['mandate_identification']); |
181 | 181 | } elseif (isset($aResponse['mandate_identification'])) {// mandate id existing in response? |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | */ |
192 | 192 | public function isInvoiceDataNeeded(PayoneMethod $oPayment) |
193 | 193 | { |
194 | - $sType = $this->getConfigParam('request_type');// auth or preauth? |
|
195 | - $blInvoiceEnabled = (bool)$this->getConfigParam('transmit_enabled', 'invoicing');// invoicing enabled? |
|
194 | + $sType = $this->getConfigParam('request_type'); // auth or preauth? |
|
195 | + $blInvoiceEnabled = (bool)$this->getConfigParam('transmit_enabled', 'invoicing'); // invoicing enabled? |
|
196 | 196 | if ($oPayment->needsProductInfo() || ($sType == PayoneConfig::REQUEST_TYPE_AUTHORIZATION && $blInvoiceEnabled)) { |
197 | - return true;// invoice data needed |
|
197 | + return true; // invoice data needed |
|
198 | 198 | } |
199 | - return false;// invoice data not needed |
|
199 | + return false; // invoice data not needed |
|
200 | 200 | } |
201 | 201 | } |
@@ -156,15 +156,15 @@ |
||
156 | 156 | */ |
157 | 157 | public function getHostedFieldConfig() |
158 | 158 | { |
159 | - $aHostedParams = $this->getHostedParams();// get hosted params from config |
|
159 | + $aHostedParams = $this->getHostedParams(); // get hosted params from config |
|
160 | 160 | |
161 | 161 | $aFieldConfig = []; |
162 | 162 | if (!empty($aHostedParams)) { |
163 | - $aFieldConfig['fields'] = $this->getFieldConfig();// generate config for all field types |
|
163 | + $aFieldConfig['fields'] = $this->getFieldConfig(); // generate config for all field types |
|
164 | 164 | $aFieldConfig['defaultStyle'] = $this->getDefaultStyles($aHostedParams); |
165 | 165 | if ($aHostedParams['Errors_active'] == "true") { |
166 | - $aFieldConfig['error'] = 'errorOutput';// area to display error-messages (optional) |
|
167 | - $aFieldConfig['language'] = $aHostedParams['Errors_lang'];// has to be defined in javascript |
|
166 | + $aFieldConfig['error'] = 'errorOutput'; // area to display error-messages (optional) |
|
167 | + $aFieldConfig['language'] = $aHostedParams['Errors_lang']; // has to be defined in javascript |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | return $aFieldConfig; |
@@ -177,6 +177,6 @@ |
||
177 | 177 | if ($this->getPaymentConfig('allowspecific', $sPaymentCode, $sStoreCode, true) == '1') { |
178 | 178 | return $this->getPaymentConfig('specificcountry', $sPaymentCode, $sStoreCode, true); |
179 | 179 | } |
180 | - return '';// empty return value if all countries are available |
|
180 | + return ''; // empty return value if all countries are available |
|
181 | 181 | } |
182 | 182 | } |
@@ -129,8 +129,8 @@ |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | if (!empty($aRates)) {// more than one shipping method existing? |
132 | - ksort($aRates);// sort by price ascending |
|
133 | - return array_shift($aRates);// return the cheapest shipping-method |
|
132 | + ksort($aRates); // sort by price ascending |
|
133 | + return array_shift($aRates); // return the cheapest shipping-method |
|
134 | 134 | } |
135 | 135 | return false; |
136 | 136 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | if (!empty($sText)) { |
136 | 136 | $sText = str_replace(array_keys($aSubstitutionArray), array_values($aSubstitutionArray), $sText); |
137 | 137 | if ($iMaxLength !== false && strlen($sText) > $iMaxLength) { |
138 | - $sText = substr($sText, 0, $iMaxLength);// shorten text if too long |
|
138 | + $sText = substr($sText, 0, $iMaxLength); // shorten text if too long |
|
139 | 139 | } |
140 | 140 | return $sText; |
141 | 141 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function getInvoiceAppendix(SalesOrder $oOrder) |
152 | 152 | { |
153 | - $sText = $this->getConfigParam('invoice_appendix', 'invoicing');// get invoice appendix from config |
|
153 | + $sText = $this->getConfigParam('invoice_appendix', 'invoicing'); // get invoice appendix from config |
|
154 | 154 | $aSubstitutionArray = [ |
155 | 155 | '{{order_increment_id}}' => $oOrder->getIncrementId(), |
156 | 156 | '{{customer_id}}' => $oOrder->getCustomerId(), |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function getNarrativeText(SalesOrder $oOrder, PayoneMethod $oPayment) |
170 | 170 | { |
171 | - $sText = $this->getConfigParam($oPayment->getCode(), 'text');// get narrative text for payment from config |
|
171 | + $sText = $this->getConfigParam($oPayment->getCode(), 'text'); // get narrative text for payment from config |
|
172 | 172 | $aSubstitutionArray = [ |
173 | 173 | '{{order_increment_id}}' => $oOrder->getIncrementId(), |
174 | 174 | ]; |
@@ -188,6 +188,6 @@ |
||
188 | 188 | if ($iCount === null) { |
189 | 189 | return 0; |
190 | 190 | } |
191 | - return $iCount+1; |
|
191 | + return $iCount + 1; |
|
192 | 192 | } |
193 | 193 | } |
@@ -134,7 +134,7 @@ |
||
134 | 134 | 'cardpan' => ['type' => Table::TYPE_TEXT, 'length' => 32, 'option' => []], |
135 | 135 | 'clearing_bankaccountholder' => ['type' => Table::TYPE_TEXT, 'length' => 255, 'option' => []], |
136 | 136 | 'clearing_bankaccount' => ['type' => Table::TYPE_TEXT, 'length' => 32, 'option' => []], |
137 | - 'clearing_bankcode' => ['type' => Table::TYPE_TEXT, 'length' => 32, 'option' => [],], |
|
137 | + 'clearing_bankcode' => ['type' => Table::TYPE_TEXT, 'length' => 32, 'option' => [], ], |
|
138 | 138 | 'clearing_bankname' => ['type' => Table::TYPE_TEXT, 'length' => 255, 'option' => []], |
139 | 139 | 'clearing_bankbic' => ['type' => Table::TYPE_TEXT, 'length' => 32, 'option' => []], |
140 | 140 | 'clearing_bankiban' => ['type' => Table::TYPE_TEXT, 'length' => 32, 'option' => []], |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $sRequest = $this->getData($sKey); |
76 | 76 | if ($sRequest) { |
77 | 77 | if (Toolkit::isUTF8($sRequest)) { |
78 | - $sRequest = utf8_decode($sRequest);// needed for unserializing the array |
|
78 | + $sRequest = utf8_decode($sRequest); // needed for unserializing the array |
|
79 | 79 | } |
80 | 80 | $aRequest = unserialize($sRequest); |
81 | 81 | if (is_array($aRequest)) { |
@@ -108,7 +108,7 @@ |
||
108 | 108 | $aRequest = $oContext->getRequest()->getPostValue(); |
109 | 109 | $sRawStatus = serialize($aRequest); |
110 | 110 | if (!Toolkit::isUTF8($sRawStatus)) { |
111 | - $sRawStatus = utf8_encode($sRawStatus);// needed for serializing the array |
|
111 | + $sRawStatus = utf8_encode($sRawStatus); // needed for serializing the array |
|
112 | 112 | } |
113 | 113 | $sOrderId = $oOrder !== null ? $oOrder->getIncrementId() : ''; |
114 | 114 | $this->getConnection()->insert( |