易趣交易API "AddItem"错误:缺少付款方式



使用易趣的API交易时,出现错误Payment method is missing。完整的错误消息如下:

SimpleXMLElement Object
(
[Timestamp] => 2014-11-08T13:13:09.853Z
[Ack] => Failure
[Errors] => Array
    (
        [0] => SimpleXMLElement Object
            (
                [ShortMessage] => Payment method is not valid.
                [LongMessage] => The payment method selected is no longer available.
                [ErrorCode] => 10128
                [SeverityCode] => Warning
                [ErrorParameters] => SimpleXMLElement Object
                    (
                        [@attributes] => Array
                            (
                                [ParamID] => 0
                            )
                        [Value] =>  
                    )
                [ErrorClassification] => RequestError
            )
        [1] => SimpleXMLElement Object
            (
                [ShortMessage] => Sales tax has been dropped.
                [LongMessage] => Sales tax/ VAT was dropped from the listing     as per the new Sales Tax / VAT policy. The item was / will be listed successfully. You may revise the listing to specify an all inclusive price.
                [ErrorCode] => 20233
                [SeverityCode] => Warning
                [ErrorClassification] => RequestError
            )
        [2] => SimpleXMLElement Object
            (
                [ShortMessage] => Payment method is missing.
                [LongMessage] => You must choose at least one payment method.
                [ErrorCode] => 354
                [SeverityCode] => Error
                [ErrorClassification] => RequestError
            )
        [3] => SimpleXMLElement Object
            (
                [ShortMessage] => Return policy is not supported.
                [LongMessage] => Return policy is not supported for this category.
                [ErrorCode] => 21916329
                [SeverityCode] => Warning
                [ErrorClassification] => RequestError
            )
    )
[Version] => 897
[Build] => E897_UNI_API5_17253832_R1
)
/****************************************************************/

当我们使用以下代码在易趣商家帐户中调用additem时,会引发错误。

$email  = 'abc@gmail.com';
$ShippingService  = 'IN_Express';
$CountryCode = 'IN';
$Currency = 'INR';
$Location = 'Coimbatore';
$Category = '174231';
$PostalCode = 'mypostalcode';
$PaymentMethod = 'IntegratedMerchantCreditCard';
/*
* Either one of this CreditCard, CashOnPickup or CCAccepted;
*/
$requestBody = <?xml version="1.0" encoding="utf-8"?>
<AddItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>'.$token.'</eBayAuthToken>
  </RequesterCredentials>
  <ErrorLanguage>en_US</ErrorLanguage>
  <WarningLevel>High</WarningLevel>
  <Item>
    <Title>Harry Potter and the Philosopher's Stone</Title>
<Description>
  This is the first book in the Harry Potter series. In excellent condition!
</Description>
<PrimaryCategory>
  <CategoryID>'.$Category.'</CategoryID>
</PrimaryCategory>
<StartPrice>1.0</StartPrice>
<CategoryMappingAllowed>true</CategoryMappingAllowed>
<ConditionID>4000</ConditionID>
<Country>'.$CountryCode.'</Country>
<Currency>'.$Currency.'</Currency>
<DispatchTimeMax>3</DispatchTimeMax>
<ListingDuration>Days_7</ListingDuration>
<ListingType>Chinese</ListingType>
<PaymentMethods>'.$PaymentMethod.'</PaymentMethods>
<!--PayPalEmailAddress>'.$email.'</PayPalEmailAddress-->
<PictureDetails>
  <PictureURL>http://pics.ebay.com/aw/pics/dot_clear.gif</PictureURL>
</PictureDetails>
<PostalCode>'.$PostalCode.'</PostalCode>
<Quantity>1</Quantity>
<ReturnPolicy>
  <ReturnsAcceptedOption>ReturnsAccepted</ReturnsAcceptedOption>
  <RefundOption>MoneyBack</RefundOption>
  <ReturnsWithinOption>Days_30</ReturnsWithinOption>
  <Description>If you are not satisfied, return the book for refund.            </Description>
  <ShippingCostPaidByOption>Buyer</ShippingCostPaidByOption>
</ReturnPolicy>
<ShippingDetails>
  <ShippingType>Flat</ShippingType>
  <ShippingServiceOptions>
    <ShippingServicePriority>1</ShippingServicePriority>
    <ShippingService>'.$ShippingService.'</ShippingService>
    <ShippingServiceCost>82.50</ShippingServiceCost>
  </ShippingServiceOptions>
</ShippingDetails>
<Site>US</Site>
<!--newly added fields-->
<Location>'.$Location.'</Location>
 </Item>
</AddItemRequest>;
</code>
/****************************************************************/

我很感激你们的帮助,并期待着收到你们的来信。

根据易趣关于付款方式的文档(http://developer.ebay.com/devzone/xml/docs/reference/ebay/extra/AddFxdPrcItmRqst.Itm.PymntMthds.html):

综合商户信用卡(输入/输出)只有卖家有支付网关帐户,才能添加此支付方式。

请检查并确保您已启用您的帐户以允许使用支付网关。默认情况下,这不是设置或配置的。

您可以在此处执行此操作:https://arbd.ebay.com/ws/eBayISAPI.dll?SetUpPaymentGatewaySignupPage

最新更新