0

我正在使用 UPS 快递服务来递送包裹。在我的网站中,我需要使用跟踪号显示特定订单的交货状态,我使用了以下示例, https://github.com/chetan/php-ups-api

我在配置文件中添加了访问密钥、用户名和密码。我正在使用该库中的 tracking.php 文件进行测试。但我收到以下错误,

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 

谁能告诉我在哪里可以得到这个文件。

我也尝试过使用 https://www.ups.com/upsdeveloperkit/downloadresource?loc=en_US

\project\TrackingPACKAGE\TRACKINGWebServices\CodeSamples\Track\PHP\SoapTrackClient.php 文件

我已添加,$wsdl = "../../../SCHEMAS-WSDLs/Track.wsdl"; 作为参数。

但是得到以下错误,

SoapFault Object ( [message:protected] => 由于客户端数据引发了异常。[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] => 由于客户端数据引发了异常。[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身份验证信息。)))))[xdebug_message] =>(!)SoapFault:由于客户端数据引发了异常。在 /home/project/TrackingPACKAGE/TRACKINGWebServices/CodeSamples/Track/PHP/SoapTrackClient.php 第 62 行调用堆栈#TimeMemoryFunctionLocation 10.0006132036{main}( )../SoapTrackClient.php:0 20.0079240060SoapClient->__soapCall( )../ SoapTrackClient.php:62)

请帮我。

4

1 回答 1

1

错误消息告诉您需要安装 PEAR Serializer 包:https ://pear.php.net/package/XML_Serializer/

于 2015-07-07T10:58:29.190 回答