Neha Dangui
Neha Dangui

Reputation: 647

Display delivery status from UPS

I am using the UPS courier service for the delivery of the packages. In my website I need to display the delivery status of a particular order using the tracking number, I used the following example, https://github.com/chetan/php-ups-api

I added the access key, username and password in the config file. and I am using tracking.php file fro this library for testing purpose. But I get the following error,

Fatal error: require_once(): Failed opening required 'XML/Unserializer.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/project/php-ups-api-master/UpsAPI/Client.php on line 119 

Can anyone please tell me where can I get this file.

I have also tried using https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_US

\project\TrackingPACKAGE\TRACKINGWebServices\CodeSamples\Track\PHP\SoapTrackClient.php file

I have added, $wsdl = "../../../SCHEMAS-WSDLs/Track.wsdl"; as the parameter.

But get the following error,

SoapFault Object ( [message:protected] => An exception has been raised as a result of client data. [string:Exception:private] => [code:protected] => 0 [file:protected] => /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php [line:protected] => 62 [trace:Exception:private] => Array ( [0] => Array ( [file] => /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php [line] => 62 [function] => __soapCall [class] => SoapClient [type] => -> [args] => Array ( [0] => ProcessTrack [1] => Array ( [0] => ) ) ) ) [previous:Exception:private] => [faultstring] => An exception has been raised as a result of client data. [faultcode] => Client [faultcodens] => http://schemas.xmlsoap.org/soap/envelope/ [detail] => stdClass Object ( [Errors] => stdClass Object ( [ErrorDetail] => stdClass Object ( [Severity] => Authentication [PrimaryErrorCode] => stdClass Object ( [Code] => 250002 [Description] => Invalid Authentication Information. ) ) ) ) [xdebug_message] => ( ! ) SoapFault: An exception has been raised as a result of client data. in /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php on line 62 Call Stack #TimeMemoryFunctionLocation 10.0006132036{main}( )../SoapTrackClient.php:0 20.0079240060SoapClient->__soapCall( )../SoapTrackClient.php:62 )

Please help me.

Upvotes: 0

Views: 833

Answers (1)

stdob--
stdob--

Reputation: 29172

Error message tell that you need install PEAR Serializer package: https://pear.php.net/package/XML_Serializer/

Upvotes: 1

Related Questions