@@ -147,7 +147,7 @@ discard block  | 
                                                    ||
| 147 | 147 |          if ($aPositions === false || $blFirstCapture === true || $blDebit === true) { | 
                                                        
| 148 | 148 | $this->addShippingItem($oOrder, $aPositions, $blDebit, $dShippingCosts); // add shipping invoice params to request  | 
                                                        
| 149 | 149 | $this->addDiscountItem($oOrder, $aPositions, $blDebit); // add discount invoice params to request  | 
                                                        
| 150 | - $this->addGiftCardItem($oOrder); // add gift card invoice params to request  | 
                                                        |
| 150 | + $this->addGiftCardItem($oOrder); // add gift card invoice params to request  | 
                                                        |
| 151 | 151 | }  | 
                                                        
| 152 | 152 | return $this->dAmount;  | 
                                                        
| 153 | 153 | }  | 
                                                        
@@ -186,11 +186,11 @@ discard block  | 
                                                    ||
| 186 | 186 |      { | 
                                                        
| 187 | 187 |          $giftCards = json_decode($oOrder->getData('gift_cards'), true); | 
                                                        
| 188 | 188 | |
| 189 | -        if(empty($giftCards) || !is_array($giftCards)) { | 
                                                        |
| 189 | +        if (empty($giftCards) || !is_array($giftCards)) { | 
                                                        |
| 190 | 190 | return;  | 
                                                        
| 191 | 191 | }  | 
                                                        
| 192 | 192 | |
| 193 | -        foreach($giftCards as $giftCard) { | 
                                                        |
| 193 | +        foreach ($giftCards as $giftCard) { | 
                                                        |
| 194 | 194 | $this->addInvoicePosition($giftCard['c'], -$giftCard['authorized'], 'voucher', 1, 'Giftcard', 0);  | 
                                                        
| 195 | 195 | }  | 
                                                        
| 196 | 196 | }  | 
                                                        
@@ -288,7 +288,7 @@ discard block  | 
                                                    ||
| 288 | 288 |      { | 
                                                        
| 289 | 289 |          if (fmod(floatval($dItemAmount), 1.0) > 0) { // input does not represent an integer | 
                                                        
| 290 | 290 | $sErrorMessage = "Unable to use floating point values for item amounts! Parameter was: ";  | 
                                                        
| 291 | - throw new \InvalidArgumentException($sErrorMessage . strval($dItemAmount), 1);  | 
                                                        |
| 291 | + throw new \InvalidArgumentException($sErrorMessage.strval($dItemAmount), 1);  | 
                                                        |
| 292 | 292 |          } else { // return the integer value | 
                                                        
| 293 | 293 | return intval($dItemAmount);  | 
                                                        
| 294 | 294 | }  | 
                                                        
@@ -205,7 +205,7 @@ discard block  | 
                                                    ||
| 205 | 205 | protected function removeBannedPaymentMethods($aPaymentMethods, Quote $oQuote)  | 
                                                        
| 206 | 206 |      { | 
                                                        
| 207 | 207 | $aBannedMethos = $this->getBannedPaymentMethods($oQuote);  | 
                                                        
| 208 | -        for($i = 0; $i < count($aPaymentMethods); $i++) { | 
                                                        |
| 208 | +        for ($i = 0; $i < count($aPaymentMethods); $i++) { | 
                                                        |
| 209 | 209 | $sCode = $aPaymentMethods[$i]->getCode();  | 
                                                        
| 210 | 210 |              if (array_key_exists($sCode, $aBannedMethos) !== false) { | 
                                                        
| 211 | 211 | $iBannedUntil = strtotime($aBannedMethos[$sCode]);  | 
                                                        
@@ -228,7 +228,7 @@ discard block  | 
                                                    ||
| 228 | 228 | $aWhitelist = $this->checkoutSession->getPayonePaymentWhitelist();  | 
                                                        
| 229 | 229 |          if (!empty($aWhitelist)) { | 
                                                        
| 230 | 230 | $iCount = count($aPaymentMethods);  | 
                                                        
| 231 | -            for($i = 0; $i < $iCount; $i++) { | 
                                                        |
| 231 | +            for ($i = 0; $i < $iCount; $i++) { | 
                                                        |
| 232 | 232 |                  if (array_search($aPaymentMethods[$i]->getCode(), $aWhitelist) === false) { | 
                                                        
| 233 | 233 | unset($aPaymentMethods[$i]);  | 
                                                        
| 234 | 234 | }  | 
                                                        
@@ -245,7 +245,7 @@ discard block  | 
                                                    ||
| 245 | 245 | */  | 
                                                        
| 246 | 246 | public function removeAmazonPay($aPaymentMethods)  | 
                                                        
| 247 | 247 |      { | 
                                                        
| 248 | -        for($i = 0; $i < count($aPaymentMethods); $i++) { | 
                                                        |
| 248 | +        for ($i = 0; $i < count($aPaymentMethods); $i++) { | 
                                                        |
| 249 | 249 |              if (isset($aPaymentMethods[$i]) && $aPaymentMethods[$i]->getCode() == PayoneConfig::METHOD_AMAZONPAY) { | 
                                                        
| 250 | 250 | unset($aPaymentMethods[$i]);  | 
                                                        
| 251 | 251 | }  | 
                                                        
@@ -268,7 +268,7 @@ discard block  | 
                                                    ||
| 268 | 268 | PayoneConfig::METHOD_KLARNA_DEBIT,  | 
                                                        
| 269 | 269 | PayoneConfig::METHOD_KLARNA_INSTALLMENT  | 
                                                        
| 270 | 270 | ];  | 
                                                        
| 271 | -        for($i = 0; $i < count($aPaymentMethods); $i++) { | 
                                                        |
| 271 | +        for ($i = 0; $i < count($aPaymentMethods); $i++) { | 
                                                        |
| 272 | 272 |              if (isset($aPaymentMethods[$i])) { | 
                                                        
| 273 | 273 |                  if ($aPaymentMethods[$i]->getCode() == PayoneConfig::METHOD_KLARNA_BASE) { | 
                                                        
| 274 | 274 | $iKeyKlarna = $i;  | 
                                                        
@@ -107,7 +107,7 @@  | 
                                                    ||
| 107 | 107 |                  if ($aResponse['status'] == 'OK') { | 
                                                        
| 108 | 108 |                      $oResponse->setData('clientToken', $aResponse['add_paydata[client_token]']); | 
                                                        
| 109 | 109 | $blSuccess = true;  | 
                                                        
| 110 | -                } elseif($aResponse['status'] == 'ERROR') { | 
                                                        |
| 110 | +                } elseif ($aResponse['status'] == 'ERROR') { | 
                                                        |
| 111 | 111 |                      $oResponse->setData('errormessage', $aResponse['customermessage']); | 
                                                        
| 112 | 112 | }  | 
                                                        
| 113 | 113 | }  |