0

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.

Neha Dangui
  • 597
  • 2
  • 13
  • 28

1 Answers1

1

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

stdob--
  • 28,222
  • 5
  • 58
  • 73
  • Thank you :) Now the error is gone. But I don't get any result. :< var_dump($tracking->getPackageStatus()); echoes out empty. I only enter the transaction number in the form. – Neha Dangui Jul 07 '15 at 11:14
  • `Invalid Authentication Information` - check you authentication parameters. Also, why not use fresh lib like https://github.com/gabrielbull/php-ups-api ? – stdob-- Jul 08 '15 at 00:54
  • Can you please tell me the steps to follow to integrate this github.com/gabrielbull/php-ups-api – Neha Dangui Jul 08 '15 at 04:43