We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 73da84dc authored by Rik ter Beek's avatar Rik ter Beek

#89 add itemId into request for ratepay

parent f50664e2
...@@ -441,18 +441,12 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -441,18 +441,12 @@ class Redirect extends \Magento\Payment\Block\Form
$item->getPrice(), $item->getPrice(),
$currency $currency
) : $this->_adyenHelper->formatAmount($item->getTaxAmount(), $currency); ) : $this->_adyenHelper->formatAmount($item->getTaxAmount(), $currency);
// $product = $item->getProduct();
// Calculate vat percentage // Calculate vat percentage
$percentageMinorUnits = $this->_adyenHelper->getMinorUnitTaxPercent($item->getTaxPercent()); $percentageMinorUnits = $this->_adyenHelper->getMinorUnitTaxPercent($item->getTaxPercent());
$formFields['openinvoicedata.' . $linename . '.itemVatPercentage'] = $percentageMinorUnits; $formFields['openinvoicedata.' . $linename . '.itemVatPercentage'] = $percentageMinorUnits;
$formFields['openinvoicedata.' . $linename . '.numberOfItems'] = (int) $item->getQtyOrdered(); $formFields['openinvoicedata.' . $linename . '.numberOfItems'] = (int) $item->getQtyOrdered();
if ($this->_order->getPayment()->getAdditionalInformation( if ($this->_order->getPayment()->getAdditionalInformation(
\Adyen\Payment\Observer\AdyenHppDataAssignObserver::BRAND_CODE) == "klarna" \Adyen\Payment\Observer\AdyenHppDataAssignObserver::BRAND_CODE) == "klarna"
) { ) {
...@@ -460,6 +454,11 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -460,6 +454,11 @@ class Redirect extends \Magento\Payment\Block\Form
} else { } else {
$formFields['openinvoicedata.' . $linename . '.vatCategory'] = "None"; $formFields['openinvoicedata.' . $linename . '.vatCategory'] = "None";
} }
if ($item->getSku() != "") {
$formFields['openinvoicedata.' . $linename . '.itemId'] = $item->getSku();
}
} }
$formFields['openinvoicedata.refundDescription'] = "Refund / Correction for ".$formFields['merchantReference']; $formFields['openinvoicedata.refundDescription'] = "Refund / Correction for ".$formFields['merchantReference'];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment