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 6f1360fd authored by rikt's avatar rikt

[PW-1628] Use getXForwardedFor instead of getRemoteIp to retrieve the...

[PW-1628] Use getXForwardedFor instead of getRemoteIp to retrieve the shopperIp rather then server IP
parent 0514b25f
...@@ -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