-
-
Notifications
You must be signed in to change notification settings - Fork 452
Add Fedex REST API rate and tracking functionality, to co-exist with Fedex WSDL #4374
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
base: main
Are you sure you want to change the base?
Conversation
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.
|
Someone using FEDEX to test it? |
|
There was a problem hiding this 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.
|
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());
Refactor duplicated lines from sonarqubecloud quality gate result
There was a problem hiding this 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.
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.
|





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)
Manual testing scenarios (*)
Questions or comments
The change requires PHP 8.1 and above, as the package shipstream/fedex-rest-sdk requires.