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

Merge pull request #502 from Adyen/bug/PW-1628-wrong-shopper-ip

[PW-1628] Use getXForwardedFor instead of getRemoteIp to retrieve the…
parents 2742d1c3 6f1360fd
......@@ -52,8 +52,8 @@ class CustomerIpDataBuilder implements BuilderInterface
{
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$order = $paymentDataObject->getOrder();
$shopperIp = $paymentDataObject->getPayment()->getOrder()->getXForwardedFor();
return $this->adyenRequestsHelper->buildCustomerIpData([], $order->getRemoteIp());
return $this->adyenRequestsHelper->buildCustomerIpData([], $shopperIp);
}
}
......@@ -134,7 +134,7 @@ class AdyenPaymentProcess implements AdyenPaymentProcessInterface
$request = $this->adyenRequestHelper->buildCustomerData($request, $customerId, $billingAddress, $storeId);
// Customer Ip data builder
$shopperIp = $quote->getRemoteIp();
$shopperIp = $quote->getXForwardedFor();
$request = $this->adyenRequestHelper->buildCustomerIpData($request, $shopperIp);
// AddressDataBuilder
......
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