We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday 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 ...@@ -52,8 +52,8 @@ class CustomerIpDataBuilder 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(); $shopperIp = $paymentDataObject->getPayment()->getOrder()->getXForwardedFor();
return $this->adyenRequestsHelper->buildCustomerIpData([], $order->getRemoteIp()); return $this->adyenRequestsHelper->buildCustomerIpData([], $shopperIp);
} }
} }
...@@ -134,7 +134,7 @@ class AdyenPaymentProcess implements AdyenPaymentProcessInterface ...@@ -134,7 +134,7 @@ class AdyenPaymentProcess implements AdyenPaymentProcessInterface
$request = $this->adyenRequestHelper->buildCustomerData($request, $customerId, $billingAddress, $storeId); $request = $this->adyenRequestHelper->buildCustomerData($request, $customerId, $billingAddress, $storeId);
// Customer Ip data builder // Customer Ip data builder
$shopperIp = $quote->getRemoteIp(); $shopperIp = $quote->getXForwardedFor();
$request = $this->adyenRequestHelper->buildCustomerIpData($request, $shopperIp); $request = $this->adyenRequestHelper->buildCustomerIpData($request, $shopperIp);
// AddressDataBuilder // 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