我正在尝试为本地送货服务的电子商务系统集成 Aramex 费率计算器 API,但出现此错误。
[Code] => ERR52
[Message] => OriginAddress - Service Offering Unavailable for zip code (01300)
和
[Code] => ERR52
[Message] => DestinationAddress - Service Offering Unavailable for zip code (80000)
我的代码:
$params = array(
'ClientInfo' => array(
'AccountCountryCode' => 'LK',
'AccountEntity' => 'CMB',
'AccountNumber' => 'xxxxxxxxx',
'AccountPin' => 'xxxxxx',
'UserName' => 'xxxxx@xxxx.xxx',
'Password' => 'xxxxxxx',
'Version' => 'v1.0'
),
'Transaction' => array(
'Reference1' => '001'
),
'OriginAddress' => array(
'Line1' => 'Arimac Digital',
'Line2' => '6th Lane',
'Line3' => 'Kollupitiya',
'City' => 'Colombo',
'PostCode' => '01300',
'CountryCode' => 'LK'
),
'DestinationAddress' => array(
'Line1' => 'Mr. Lakshitha',
'Line2' => '6th Lane',
'Line3' => 'Karapitiya',
'City' => 'Galle',
'PostCode' => '80000',
'CountryCode' => 'LK'
),
'ShipmentDetails' => array(
'PaymentType' => 'C',
'ProductGroup' => 'DOM',
'ProductType' => 'PPX',
'ActualWeight' => array('Value' => 0.2, 'Unit' => 'KG'),
'ChargeableWeight' => array('Value' => 0.2, 'Unit' => 'KG'),
'NumberOfPieces' => 1
)
);
$soapClient = new SoapClient('aramex-rates-calculator-wsdl.wsdl', array('trace' => 1));
$results = $soapClient->CalculateRate($params);
首先我想,这是因为 aramex 在我的国家(斯里兰卡)不支持本地交付。但是,从他们的网站上,我可以毫无错误地计算出我国内各个地方之间的费率。
谁能告诉我,我是否正确添加了所有参数?是否需要任何额外的参数?