sailrish / shipit

shipit node module
MIT License
86 stars 65 forks source link

Fedex #15

Closed Russ93 closed 9 years ago

Russ93 commented 9 years ago

Hey just a heads up. Fedex just changed their api and I keep getting

invalid reply

and when I look into it it says

{
    faultcode: 'soapenv:Client',
    faultstring: 'Failure while unmarshalling message: Failed to parse XML text',
    detail: {
        fault: {
            errorCode: '9999',
            reason: 'Failure while unmarshalling message: Failed to parse XML text'
        }
    }
}

It's not just this plugin all of them are down

sailrish commented 9 years ago

Thanks for the alert! I'll take a look and provide a fix soon.

sailrish commented 9 years ago

Hmm. It looks like it is working fine here:

coffee> {FedexClient} = require 'shipit'
coffee> fedex = new FedexClient key: 'xxx', password: 'xxx', account: 'xxx', meter: 'xxx'
coffee> fedex.requestData {trackingNumber: '338546050904603'}, (err, result) -> console.log result

outputs:

{ eta: undefined,
  service: 'FedEx Ground',
  weight: '1.0 LB',
  destination: 'Lavergne, TN',
  activities:
   [ { timestamp: Mon Jul 20 2015 10:42:00 GMT-0500 (CDT),
       location: 'Richfield, OH 44286',
       details: 'Picked up' },
     { timestamp: Mon Jul 20 2015 09:25:00 GMT-0500 (CDT),
       location: 'Bedford Heights, OH 44146',
       details: 'In FedEx possession' } ],
  status: 2,
  request: { trackingNumber: '338546050904603' } }
Russ93 commented 9 years ago

Ok it might just be me I had to create a new apikey and the authentication is failing I got this returned

[ { 'v5:Severity': [ 'ERROR' ],
    'v5:Source': [ 'prof' ],
    'v5:Code': [ '1000' ],
    'v5:Message': [ 'Authentication Failed' ] } ]