Skip to content

Fix shopperIP#1306

Open
MarioNaise wants to merge 2 commits into
Adyen:masterfrom
MarioNaise:fix/shopperIP
Open

Fix shopperIP#1306
MarioNaise wants to merge 2 commits into
Adyen:masterfrom
MarioNaise:fix/shopperIP

Conversation

@MarioNaise
Copy link
Copy Markdown

Summary

Fix shopperIP field in makePaymentRequest and createSessionRequest objects:
Currently, payment.controller.js unconditionally sets the shopperIP field on paymentObject to the value from the requests x-forwarded-for header and then applies it to the initial request object later on.
This means that any shopperIP provided by the initial request gets lost.
Additionally, the x-forwarded-for header contains a wrong value (most likely the Commercetools server IP), so it should not be used as a fallback at all.
Instead, if shopperIP is missing in the clients request, it should just stay undefined.

Tested scenarios

  • makePaymentRequest contains shopperIP -> shopperIP will be forwarded to Adyen
  • makePaymentRequest doesn't contain shopperIP ->shopperIP stays undefined
  • createSessionRequest contains shopperIP -> shopperIP will be forwarded to Adyen
  • createSessionRequest doesn't contain shopperIP -> shopperIP stays undefined

Fixed issue:

@andihalberkamp
Copy link
Copy Markdown

Hi @merijndebeer-adyen ,

A colleague has provided a fix for the issue described above. This is an important issue for us because it prevents the correct IP address from being sent to Adyen.

As a result, the 3D Secure popup is shown to customers more frequently than necessary, which could negatively impact our conversion rate.

It would be great if you could review the PR when you have a moment. If you have any questions, please feel free to contact me or @MarioNaise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants