简体   繁体   English

FEDEX Web服务-所需数据信息

[英]FEDEX Web Services - information on data required

I have set up a developer test account with FedEx using the PHP code examples provided by FedEx. 我已经使用FedEx提供的PHP代码示例为FedEx设置了开发人员测试帐户。 I have the following error back from the API: 我从API返回以下错误:

"All specified account numbers must match" - code 873 “所有指定的帐号必须匹配”-代码873

I cannot find what this is caused by, the only thing I think may be causing the issue is I have an empty vairable for $dutyaccount but I have not been supplied with any duty account number and have no instructions as to what this is. 我找不到这是由什么引起的,我认为可能引起问题的唯一原因是我有一个空的$dutyaccount但我没有提供任何值班帐号,也没有任何说明。

if($var == 'check') Return true;
//main variables needed to be passes
if($var == 'key') Return 'x8Qffhfhfhfuujj0gI6XW';
if($var == 'password') Return 'dGDJghghwi2BfKa2xdvgHU1245B';    

if($var == 'shipaccount') Return '519987020';
if($var == 'meter') Return '118551669';
if($var == 'billaccount') Return '519951408';
if($var == 'dutyaccount') Return ''; // what is this??

However, if I comment out the dutyaccount I still get the same error message so perhaps this isnt even needed. 但是,如果我注释掉工作dutyaccount ,仍然会收到相同的错误消息,因此甚至不需要此消息。 I cannot find specific information on variables needed to be passed to the API to bring back rates. 我找不到需要传递给API以带回费率的变量的特定信息。 Can anyone help? 有人可以帮忙吗?

shipaccount and billaccount don't match which could cause that error. shipaccount和billaccount不匹配,这可能会导致该错误。 you should be billing to the shipper. 您应该向托运人开票。

if($var == 'shipaccount') Return 'XXX'; / your account
if($var == 'billaccount') Return 'XXX'; / who pays shipment charges
if($var == 'dutyaccount') Return 'XXX'; / who pays duties charges

but, dutyaccount could be empty because by default recipient pay duties when is delivered the shipment. 但是,占空比帐户可能为空,因为默认情况下收件人会在发货时支付关税。 if you want to define who pays the duties or transportation charges you must define that information in your request: ex: 如果您想定义谁来支付关税或运输费,则必须在请求中定义该信息:例如:

'DutiesPayment' => array(
    'PaymentType' => 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
    'Payor' => array(
    'ResponsibleParty' => array(
        'AccountNumber' => getProperty('dutyaccount'),
        'Contact' => null,
        'Address' => array('CountryCode' => 'US')
        )
    )
),

where the most important part is -> 'PaymentType' => 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY 其中最重要的部分是->'PaymentType'=>'SENDER',//有效值RECIPIENT,SENDER和THIRD_PARTY

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM