Aramex 汇率计算器 API 返回错误代码 ISE01
和以下错误消息:
Internal Server Error has occurred while getting calculating rate` while requesting
这个错误的原因是什么?
以下是 Aramex 费率计算器 API 的示例代码:
<?php
$params = array(
'ClientInfo' => array(
'AccountCountryCode' => 'JO',
'AccountEntity' => 'AMM',
'AccountNumber' => '00000',
'AccountPin' => '000000',
'UserName' => 'user@company.com',
'Password' => '000000000',
'Version' => 'v1.0'
),
'Transaction' => array(
'Reference1' => '001'
),
'OriginAddress' => array(
'City' => 'Amman',
'CountryCode' => 'JO'
),
'DestinationAddress' => array(
'City' => 'Dubai',
'CountryCode' => 'AE'
),
'ShipmentDetails' => array(
'PaymentType' => 'P',
'ProductGroup' => 'EXP',
'ProductType' => 'PPX',
'ActualWeight' => array('Value' => 5, 'Unit' => 'KG'),
'ChargeableWeight' => array('Value' => 5, 'Unit' => 'KG'),
'NumberOfPieces' => 5
)
);
$soapClient = new SoapClient('http://url/to/wsdl.wsdl', array('trace' => 1));
$results = $soapClient->CalculateRate($params);
echo '<pre>';
print_r($results);
die();
?>
最佳答案
只需下载WSDL FILE ,把它放在你的服务器上的某个地方,然后更改这一行以更正它(修复 url!):
$soapClient = new SoapClient('http://url/to/wsdl.wsdl', array('trace' => 1));
-
您的 SOAP 客户端根本无法识别没有指示的 CalculateRate
命令...
附言。为我工作,刚刚尝试过。
关于php - Aramex 汇率计算器 APT 返回错误代码 "ISE01",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25986913/