首页 > 解决方案 > 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 在我的国家(斯里兰卡)不支持本地交付。但是,从他们的网站上,我可以毫无错误地计算出我国内各个地方之间的费率。

谁能告诉我,我是否正确添加了所有参数?是否需要任何额外的参数?

标签: phpapiaramex

解决方案


使用的产品类型错误,您需要使用 ONP,因为 PPX 用于优先包裹快递。


推荐阅读