Skip to content
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

Fatal error when tracking FedEx package #30

Open
s22-tech opened this issue Mar 6, 2022 · 2 comments
Open

Fatal error when tracking FedEx package #30

s22-tech opened this issue Mar 6, 2022 · 2 comments

Comments

@s22-tech
Copy link

s22-tech commented Mar 6, 2022

Using a very simple test script:

require_once 'vendor/autoload.php';
use Sauladam\ShipmentTracker\ShipmentTracker;

$tracker = ShipmentTracker::get('FedEx');
$track = $tracker->track('123456789123');

it returns the following error:

Fatal error: Uncaught Exception: Could not fetch tracking data for [123456789123]. in /Users/php/track/sauladam/vendor/sauladam/shipment-tracker/src/Trackers/Fedex.php:30
Stack trace:
#0 /Users/php/track/sauladam/vendor/sauladam/shipment-tracker/src/Trackers/AbstractTracker.php(74): Sauladam\ShipmentTracker\Trackers\Fedex->fetch('https://www.fed...')
#1 /Users/php/track/sauladam/track.php(14): Sauladam\ShipmentTracker\Trackers\AbstractTracker->track('123456789123')
#2 {main}
  thrown in /Users/php/track/sauladam/vendor/sauladam/shipment-tracker/src/Trackers/Fedex.php on line 30

Any idea what's going wrong?

Thanks

@s22-tech
Copy link
Author

s22-tech commented Mar 8, 2022

I installed the php-fedex-api-wrapper from Jeremy Dunn and that one works for me, so the problem I described above isn't with my account info.

@andlabs
Copy link

andlabs commented Mar 24, 2022

According to https://gist.github.com/Ajithkumarsekar/10b5733173613865a69a43439487c2fe?permalink_comment_id=4105182#gistcomment-4105182 FedEx has completely turned down that API endpoint. They do have an OAuth-authenticated new API to use instead, but I have not personally tried signing up for it yet, and... yeah, API tokens. The library the OP linked in their second post requires those, so I think they're fine, at least.

Some of the couriers that offer API keys don't offer them to private individuals, only businesses; let's just hope this isn't one of them.

I can understand the desire to prevent abuse and data mining but this is getting really annoying. I don't want emails and text messages. I want a nice human-readable plain-text table that lists the status and estimate of all the shipments I'm expecting as a private individual non-business recipient from multiple couriers aggregated together on my computer. Apparently that's too much to ask nowadays, and I will not easily believe humanity is so brain-rotted by text message updates that I am alone in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants