-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the invalid currency error in credit card payment of PayPal Payflow Pro or Payments Pro #22399
Fix the invalid currency error in credit card payment of PayPal Payflow Pro or Payments Pro #22399
Conversation
…ation call, otherwise the payment would fail when store's default currency is not USD.
Hi @Hailong. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @kalpmehta, thank you for the review. |
@AlexWorking unfortunately, only members of the maintainers team are allowed to assign developers to the pull request |
@AlexWorking unfortunately, only members of the maintainers team are allowed to assign developers to the pull request |
✔️ QA Passed |
Hi @Hailong, thank you for your contribution! |
… PayPal Payflow Pro or Payments Pro #22399
Thank you. |
@magento-engcom-team give me 2.3-develop instance |
Hi @sdzhepa. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @sdzhepa, here is your Magento instance. |
Needs to provide the currency code explicitly in the $0.00 verification call, otherwise the payment would fail when store's default currency is not USD.
Description (*)
When the store default currency is not USD, the credit card payment with Payflow Pro or Payments Pro would fail with an error complaining "invalid currency code"
My store's default currency is set to CAD, the Payflow Pro payment didn't go through. By PayPal support team's investigation, they found the "$0.00 verification call" is with USD currency, but the following non zero call was with CAD currency, in which condition PayPal doesn't accept the payment.
But I don't find our API calls to PayPal ever explicitly added USD, so that I can guess without a currency code is actually default to USD.
Back to the two calls from Magento to PayPal, the second one is using store default for currency code, so the change is to also add store default currency code to the first one. And by changing that, my transaction went through successfully.
Here is the original comments from PayPal support guys:
Fixed Issues (if relevant)
n/a
Manual testing scenarios (*)
Contribution checklist (*)