-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Component: PaymentIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
The currency is missing when doing an Authorization with Payflow.
The currency setting was already missing in other places and was fixed by @Kriby in
337c63c
and was merged into the develop branch
152dbdc
but it seems that the Authorization code was forgotten.
Preconditions
- Magento version 2.1.2
- PHP 7.0.11
- MySQL 5.6
Steps to reproduce
- Set the store currency to CAD
- Set Payflow "Payment Action" to "Authorization"
- Make a purchase
Expected result
- The authorization should be made in CAD and the payment should be approved.
Actual result
- On PayPal the authorization transaction was made in USD.
- The payment fails with error "Invalid or unsupported currency code".
Fix
In app/code/Magento/Paypal/Model/Payflowpro.php in the buildBasicRequest method
Add
$request->setCurrency('CAD'); // Hardcoded to CAD
Metadata
Metadata
Assignees
Labels
Component: PaymentIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report