|
@@ -162,7 +162,7 @@ discard block |
|
|
block discarded – undo |
|
162
|
162
|
|
|
163
|
163
|
if ($aPositions === false || $blFirstCapture === true || $blDebit === true) { |
|
164
|
164
|
$this->addShippingItem($oOrder, $aPositions, $blDebit, $dShippingCosts); // add shipping invoice params to request |
|
165
|
|
- $this->addGiftCardItem($oOrder); // add gift card invoice params to request |
|
|
165
|
+ $this->addGiftCardItem($oOrder); // add gift card invoice params to request |
|
166
|
166
|
$this->addDiscountItem($oOrder, $aPositions, $blDebit); // add discount invoice params to request |
|
167
|
167
|
$this->addAmastyGiftcards($oOrder, $aPositions, $blDebit); // add amasty giftcard invoice params to request |
|
168
|
168
|
} |
|
@@ -203,11 +203,11 @@ discard block |
|
|
block discarded – undo |
|
203
|
203
|
{ |
|
204
|
204
|
$giftCards = json_decode($oOrder->getData('gift_cards'), true); |
|
205
|
205
|
|
|
206
|
|
- if(empty($giftCards) || !is_array($giftCards)) { |
|
|
206
|
+ if (empty($giftCards) || !is_array($giftCards)) { |
|
207
|
207
|
return; |
|
208
|
208
|
} |
|
209
|
209
|
|
|
210
|
|
- foreach($giftCards as $giftCard) { |
|
|
210
|
+ foreach ($giftCards as $giftCard) { |
|
211
|
211
|
$giftCardAmount = $this->getGiftCardAmount($giftCard); |
|
212
|
212
|
$this->addInvoicePosition($giftCard['c'], $giftCardAmount, 'voucher', 1, 'Giftcard', 0); |
|
213
|
213
|
} |
|
@@ -370,7 +370,7 @@ discard block |
|
|
block discarded – undo |
|
370
|
370
|
{ |
|
371
|
371
|
if (fmod(floatval($dItemAmount), 1.0) > 0) { // input does not represent an integer |
|
372
|
372
|
$sErrorMessage = "Unable to use floating point values for item amounts! Parameter was: "; |
|
373
|
|
- throw new \InvalidArgumentException($sErrorMessage . strval($dItemAmount), 1); |
|
|
373
|
+ throw new \InvalidArgumentException($sErrorMessage.strval($dItemAmount), 1); |
|
374
|
374
|
} else { // return the integer value |
|
375
|
375
|
return intval($dItemAmount); |
|
376
|
376
|
} |