我正在尝试发送自动易趣发票添加运费金额但我在执行时收到错误代码10080.
我的代码
$ShippingServiceOptions = new stdClass();
$ShippingServiceOptions->ShippingService="AU_Frieght";
//$ShippingServiceOptions->ShippingType="AU_Frieght";
$ShippingServiceOptions->ShippingServiceCost = array('_'=>99,'currencyID'=>'AUD');
$ShippingServiceOptions->ShippingServiceAdditionalCost = array('_'=>0,'currencyID'=>'AUD');
$ShippingServiceOptions->ShippingInsuranceCost = array('_'=>0,'currencyID'=>'AUD');
$ShippingServiceOptions->InsuranceFee=0.00;
$ShippingServiceOptions->ShippingServicePriority=1;
$invoiceRequest = new stdClass();
$invoiceRequest->Version = 803;
$invoiceRequest->OrderID = "200937602540-950490227010";
$invoiceRequest->TransactionID=950490227010;
$invoiceRequest->ItemID = 200937602540;
$invoiceRequest->ShippingServiceOptions = $ShippingServiceOptions;
$sendInvoice = new EbayAPI();
$result=$sendInvoice->SendInvoice($invoiceRequest);
var_dump($result);
错误
object(stdClass)[393]
public 'Timestamp' => string '2013-10-24T02:35:47.049Z' (length=24)
public 'Ack' => string 'Failure' (length=7)
public 'Errors' =>
object(stdClass)[394]
public 'ShortMessage' => string 'Invalid postage type.' (length=21)
public 'LongMessage' => string 'Invalid <ShippingType>.' (length=23)
public 'ErrorCode' => string '10080' (length=5)
public 'SeverityCode' => string 'Error' (length=5)
public 'ErrorClassification' => string 'RequestError' (length=12)
public 'Version' => string '843' (length=3)
public 'Build' => string 'E843_INTL_APIXO_16449518_R1' (length=27)
由于 Abnab
答案 0 :(得分:0)
无法指定AU_Freight,因为在调用GeteBayDetails时未设置服务的ValidForSellingFlow标志。易趣只允许此标志为真的服务。官方docs可提供更多信息。
下面显示的是可以在 ShippingService 字段中传递的当前送货服务列表。由于这些值可以随着易趣添加和删除服务而改变,因此您应定期致电GeteBayDetails。
(注意要指定的值以粗体显示)
标准服务
快递服务
澳大利亚境外的服务