Skip to content

Commit

Permalink
Changed the tracking page URL for Pitney Bowes
Browse files Browse the repository at this point in the history
  • Loading branch information
freshlogic committed Jul 28, 2021
1 parent 701503f commit ecaecfa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.8.0] - 2021-07-27
### Changed
- Changed the tracking page URL for Pitney Bowes.

## [1.7.5] - 2021-03-17
### Changed
- Changed the default URL for USPS to use https (instead of http).
12 changes: 6 additions & 6 deletions carriers/pitneyBowes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ function PitneyBowes(options) {
return pitneyBowesClient.tracking({ carrier: 'IMB', trackingNumber: trackingNumber.substring(0, 20) }, callback);
}

// Newgistics Ground (length 34): 4201913892748927005269000023298282
// Pitney Bowes Standard (length 34): 4201913892748927005269000023298282
pitneyBowesClient.tracking({ carrier: 'FDR', trackingNumber }, callback);
}, function(err, data) {
const results = {
carrier: 'Newgistics',
carrier: 'Pitney Bowes',
events: [],
raw: data
};

if (isImb) {
results.carrier = 'Pitney Bowes';
if (_options && _options.carrier && _options.carrier.toLowerCase() === 'newgistics') {
results.carrier = 'Newgistics';
}

if (err) {
Expand Down Expand Up @@ -139,8 +139,8 @@ function PitneyBowes(options) {
results.events.push(event);
});

// Add url to carrier tracking page
results.url = `https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=${encodeURIComponent(trackingNumber)}`;
// Add URL to carrier tracking page
results.url = `https://pitneybowes.shipment.co/track/${trackingNumber}`;

if (isImb) {
results.url = `https://tracking.pb.com/${trackingNumber.substring(0, 20)}`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"type": "git",
"url": "https://github.com/mediocre/bloodhound.git"
},
"version": "1.7.5"
"version": "1.8.0"
}

0 comments on commit ecaecfa

Please sign in to comment.