Skip to content

Conversation

@xqiu
Copy link

@xqiu xqiu commented Nov 21, 2024

Description (*)

Add Fedex REST API rate and tracking functionality, to co-exist with Fedex WSDL.
The reason is that Fedex WSDL still functions. But Fedex starts to require some accounts to use REST API (in my actual case), and stopped one of my accounts to use WSDL.

Fixed Issues (if relevant)

  1. Fixes FedEx WSDLS will be retired on May 15, 2024, need to use RESTful API #3308

Manual testing scenarios (*)

  1. Use Fedex shipping method, get quotation from Fedex test server
  2. Use Fedex shipping method, get quotation from Fedex production server (I've used the code in production)
  3. Use Fedex shipping method, to track the shipment in openmage backend and frontend, when clicking the fedex shipment number 123456789012 for both Fedex test and productions server (I've used the code in production)

Questions or comments

The change requires PHP 8.1 and above, as the package shipstream/fedex-rest-sdk requires.

xqiu added 5 commits November 13, 2024 11:32
Fedex is currently in transition from WSDL to REST API.  This change allows configurable usage of WSDL or REST API.

Note: uses shipstream/fedex-rest-sdk, but currently it's not updated with fedex tracking API schema, so need to use a patch branch for it.

Also composer installing shipstream/fedex-rest-sdk requires PHP 8.1+, so I've to change php version as well for this commit.
@github-actions github-actions bot added documentation Component: Usa Relates to Mage_Usa composer Relates to composer.json labels Nov 21, 2024
@xqiu xqiu marked this pull request as ready for review December 1, 2024 22:47
@sreichel
Copy link
Contributor

sreichel commented Jan 6, 2025

Someone using FEDEX to test it?

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@mattdavenport mattdavenport requested a review from Copilot August 14, 2025 19:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds FedEx REST API functionality to co-exist alongside the existing FedEx WSDL implementation, allowing users to switch between API types as needed.

  • Adds a REST API SDK dependency and configuration options for REST API credentials
  • Implements REST API rate calculation and shipment tracking functionality
  • Maintains backward compatibility with existing WSDL implementation while supporting PHP 8.1+ requirement

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
composer.json Adds FedEx REST SDK dependency and updates PHP version requirement to 8.1.28
app/code/core/Mage/Usa/etc/system.xml Adds configuration fields for REST API toggle and tracking credentials
app/code/core/Mage/Usa/etc/config.xml Adds encrypted backend models for new REST API tracking credentials
app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php Implements REST API rate and tracking methods with conditional logic
README.md Adds contributor entry
.all-contributorsrc Adds contributor configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mattdavenport
Copy link
Contributor

mattdavenport commented Aug 14, 2025

Figured I would try the Copilot reviewer here. FedEx will be retiring Web Services on 6/1/26 (per a recent reminder email), which I suppose was pushed back from the original May '24 date, and as @xqiu mentioned, new accounts can potentially no longer access the SOAP API. I'll keep an eye on this one and do some testing myself in the coming weeks, but if any other maintainer has an account (and the time 😄) to test it would be great to push this through.

Fixed spelling mistakes, typos and add a comment on why we use  $weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
@addison74 addison74 requested a review from Copilot September 26, 2025 18:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

xqiu and others added 3 commits September 27, 2025 11:22
Upgraded shipstream/fedex-rest-sdk to v1.2.0 and updated composer.lock
…ilot code review

Refactored AccountNumber instantiation for compatibility. Enhanced retry logic with exponential backoff up to 32 seconds. Improved currency conversion by validating exchange rates before applying, skipping invalid rates. Fixed delivery date handling by checking for non-empty dateAndTimes array.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Usa Relates to Mage_Usa composer Relates to composer.json documentation README

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FedEx WSDLS will be retired on May 15, 2024, need to use RESTful API

5 participants