Skip to content

Fedex REST API preferred currency issue #39765

Open
@mabaud

Description

@mabaud

Preconditions and environment

  • Magento version : 2.4.7-p4
  • A fedex account for Canada and US
  • A Magento website configured for Canada
  • The ACSD-64325_2.4.7-p3.patch applied

Steps to reproduce

  1. Go to the Canadian website
  2. Add products to the cart
  3. Go to the checkout shipping step
  4. Add a valid Canadian address
  5. Wait for shipping rates

Expected result

Fedex rates

Actual result

An error occurred:
Can't convert a shipping cost from "USD-CAD" for FedEx carrier.

Additional information

We have this issue because in the fedex request the rateRequestType param is missing the "PREFERRED" value, and the preferredCurrency parameter is missing. This is causing fedex to respond rates in USD instead of CAD, and since we don't have currency rate USD/CAD in Magento, we are getting this error.

Note: we have this issue after applying that b22a00f (with the ACSD-64325_2.4.7-p3.patch)

We didn't have that issue with the SOAP API, Fedex was responding in CAD.
Here a quickfix I made (a patch file, you have to remove the .txt extension):

currency_issue.patch.txt

Workaround : pay for a currency converter service or manually set the currency rates USD/CAD every day :)

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.7-p4Indicates original Magento version for the Issue report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions