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 eff192e4 authored by Rik ter Beek's avatar Rik ter Beek

#67 second fix to use order currency and amount instead of base

parent 667fd8ec
...@@ -53,12 +53,16 @@ class PaymentDataBuilder implements BuilderInterface ...@@ -53,12 +53,16 @@ class PaymentDataBuilder implements BuilderInterface
{ {
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */ /** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject); $paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$order = $paymentDataObject->getOrder(); $order = $paymentDataObject->getOrder();
$orderCurrencyCode = $order->getOrderCurrencyCode(); $payment = $paymentDataObject->getPayment();
$amount = $order->getGrandTotal(); $fullOrder = $payment->getOrder();
$amount = ['currency' => $orderCurrencyCode, $currencyCode = $fullOrder->getOrderCurrencyCode();
'value' => $this->adyenHelper->formatAmount($amount, $orderCurrencyCode)]; $amount = $fullOrder->getGrandTotal();
$amount = ['currency' => $currencyCode,
'value' => $this->adyenHelper->formatAmount($amount, $currencyCode)];
return [ return [
"amount" => $amount, "amount" => $amount,
......
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