php - Aramex 费率计算器 API 返回 ERR52 - 邮政编码不可用的服务提供
问题描述
我正在尝试为本地送货服务的电子商务系统集成 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 在我的国家(斯里兰卡)不支持本地交付。但是,从他们的网站上,我可以毫无错误地计算出我国内各个地方之间的费率。
谁能告诉我,我是否正确添加了所有参数?是否需要任何额外的参数?
解决方案
使用的产品类型错误,您需要使用 ONP,因为 PPX 用于优先包裹快递。
推荐阅读
- shopify - 我在 shopify order api 中将 location_id 设为 null
- java - Maven 更新具有不同父级的多模块项目
- javascript - IE Array.sort 不使用比较功能进行排序
- c++ - C ++收到整数类型的字符导致开关盒出错
- javascript - 如何使用 Ramda 更新 JSON 中任何级别的键值?
- javascript - 当我真正想要的是“对象”类型时,属性不存在 - Angular2+
- c# - 如何在clickonce中隐藏“启动应用程序”对话框
- excel - Excel - 根据匹配值复制粘贴值
- android - 自定义视图 onTouch 没有响应
- arrays - 根据内部数组条件查找数组中的项