Skip to content

Affirm Payment: Correct Country Code Handling for Canadian Transactions#149

Open
dhruv-8601 wants to merge 1 commit into
Affirm:masterfrom
dhruv-8601:get_country_code_from_currency
Open

Affirm Payment: Correct Country Code Handling for Canadian Transactions#149
dhruv-8601 wants to merge 1 commit into
Affirm:masterfrom
dhruv-8601:get_country_code_from_currency

Conversation

@dhruv-8601
Copy link
Copy Markdown


name: Affirm Payment: Correct Country Code Handling for Canadian Transactions

Description

When integrating Affirm payment gateway with our Magento backend (using a PWA frontend), the system was defaulting the transaction country to USA instead of our target country, Canada. This happened because the country data was not being properly passed from the PWA frontend to the backend, causing Affirm to use the wrong country context in the requests.

How To Reproduce

Steps to reproduce the behavior:

  1. Go to checkout
  2. complete affirm sandbox process
  3. Go to very last step and Click "Place Order"
  4. It will give Error "Transaction Authentication Failed"

Expected behavior

It should get the country code from currency but for some reason it was not getting any country code in request data in checkout.php

Benefits

It will get country from currency we need to add the mapping for each currency in getCountryCodeByCurrency function and it should work

Additional information

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.

1 participant