Skip to content

Commit

Permalink
Add code for giftwrapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinverschoor committed Jul 22, 2020
1 parent fa4def3 commit 8486beb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Model/Paymentmethod/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,26 @@ protected function doStartTransaction(Order $order)
);
}

// Gift Wrapping
$gwCost = $order->getGwPriceInclTax();
$gwTax = $order->getGwTaxAmount();

if ($this->paynlConfig->isAlwaysBaseCurrency()) {
$gwCost = $order->getGwBasePriceInclTax();
$gwTax = $order->getGwBaseTaxAmount();
}

if ($gwCost != 0) {
$arrProducts[] = array(
'id' => $order->getGwId(),
'name' => 'Gift Wrapping',
'price' => $gwCost,
'qty' => 1,
'tax' => $gwTax,
'type' => \Paynl\Transaction::PRODUCT_TYPE_HANDLING
);
}

// kortingen
$discount = $order->getDiscountAmount();
$discountTax = $order->getDiscountTaxCompensationAmount() * -1;
Expand Down

0 comments on commit 8486beb

Please sign in to comment.