|
@@ -150,7 +150,7 @@ discard block |
|
|
block discarded – undo |
|
150
|
150
|
if ($aPositions === false || $blFirstCapture === true || $blDebit === true) { |
|
151
|
151
|
$this->addShippingItem($oOrder, $aPositions, $blDebit); // add shipping invoice params to request |
|
152
|
152
|
$this->addDiscountItem($oOrder, $aPositions, $blDebit); // add discount invoice params to request |
|
153
|
|
- $this->addGiftCardItem($oOrder); // add gift card invoice params to request |
|
|
153
|
+ $this->addGiftCardItem($oOrder); // add gift card invoice params to request |
|
154
|
154
|
$this->addAmastyGiftcards($oOrder, $aPositions, $blDebit); // add amasty giftcard invoice params to request |
|
155
|
155
|
} |
|
156
|
156
|
return $this->dAmount; |
|
@@ -187,11 +187,11 @@ discard block |
|
|
block discarded – undo |
|
187
|
187
|
{ |
|
188
|
188
|
$giftCards = json_decode($oOrder->getData('gift_cards'), true); |
|
189
|
189
|
|
|
190
|
|
- if(empty($giftCards) || !is_array($giftCards)) { |
|
|
190
|
+ if (empty($giftCards) || !is_array($giftCards)) { |
|
191
|
191
|
return; |
|
192
|
192
|
} |
|
193
|
193
|
|
|
194
|
|
- foreach($giftCards as $giftCard) { |
|
|
194
|
+ foreach ($giftCards as $giftCard) { |
|
195
|
195
|
$this->addInvoicePosition($giftCard['c'], -$giftCard['authorized'], 'voucher', 1, 'Giftcard', 0); |
|
196
|
196
|
} |
|
197
|
197
|
} |
|
@@ -321,7 +321,7 @@ discard block |
|
|
block discarded – undo |
|
321
|
321
|
{ |
|
322
|
322
|
if (fmod(floatval($dItemAmount), 1.0) > 0) { // input does not represent an integer |
|
323
|
323
|
$sErrorMessage = "Unable to use floating point values for item amounts! Parameter was: "; |
|
324
|
|
- throw new \InvalidArgumentException($sErrorMessage . strval($dItemAmount), 1); |
|
|
324
|
+ throw new \InvalidArgumentException($sErrorMessage.strval($dItemAmount), 1); |
|
325
|
325
|
} else { // return the integer value |
|
326
|
326
|
return intval($dItemAmount); |
|
327
|
327
|
} |