Skip to content

Payflow Authorization currency missing #7719

Closed
@H3dz

Description

@H3dz

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

  1. Magento version 2.1.2
  2. PHP 7.0.11
  3. MySQL 5.6

Steps to reproduce

  1. Set the store currency to CAD
  2. Set Payflow "Payment Action" to "Authorization"
  3. Make a purchase

Expected result

  1. The authorization should be made in CAD and the payment should be approved.

Actual result

  1. On PayPal the authorization transaction was made in USD.
  2. 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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions