我正在使用https://github.com/timotheus/ebaysdk-python连接到ebay。
我想在ebay的英国版本上列出一个项目,使用我在那里创建的标记。所有api调用都从.com更改为.co.uk。我已将货币从美元改为英镑,但美元似乎是唯一被接受的货币。
我把一切都放在沙箱里。
知道怎么解决我的问题吗?
代码:
try:
api = Trading(config_file=None, domain='api.sandbox.ebay.com',
appid=S.EBAY_SANDBOX_APPID, devid=S.EBAY_SANDBOX_DEVID,
certid=S.EBAY_SANDBOX_CERTID, token=acc.token)
myitem = {
"Item": {
"Title": item.nazwa,
"Description": "<![CDATA[{}]]>".format(item.desc),
"PrimaryCategory": {"CategoryID": "377"},
"StartPrice": str(round(item.price.amount, 2)),
"CategoryMappingAllowed": "true",
"Country": "GB",
"ConditionID": "3000",
"Currency": "GBP",
"DispatchTimeMax": "3",
"ListingDuration": "Days_{}".format(str(item.len)),
"ListingType": "FixedPriceItem",
"PaymentMethods": "PayPal",
"PayPalEmailAddress": "abc@mail.com",
"PictureDetails": {"PictureURL": "http://i1.sandbox.ebayimg.com/03/i/00/30/07/20_1.JPG?set_id=8800005007"},
"PostalCode": "BH104HS",
"Quantity": str(round(item.qty, 0)),
"ReturnPolicy": {
"ReturnsAcceptedOption": "ReturnsAccepted",
"RefundOption": "MoneyBack",
"ReturnsWithinOption": "Days_30",
"Description": "If you are not satisfied, return the goods for refund.",
"ShippingCostPaidByOption": "Buyer"
},
"ShippingDetails": {
"ShippingType": "Flat",
"ShippingServiceOptions": {
"ShippingServicePriority": "1",
"ShippingService": "USPSMedia",
"ShippingServiceCost": "4.50"
}
},
"Site": 'UK'
}
}
api.execute('AddFixedPriceItem', myitem)
print(api)
dump(api, True)
except ConnectionError as e:
print(e)
print(e.response.dict())响应:
AddFixedPriceItem: Class: RequestError, Severity: Error, Code: 95, Invalid auction currency. The auction currency specified does not match the auction currency for the selected site.' {'Errors': {'ErrorCode': '95', 'ShortMessage': 'Invalid auction currency.', 'SeverityCode': 'Error', 'ErrorClassification': 'RequestError', 'LongMessage': 'The auction currency specified does not match the auction currency for the selected site.'}, 'Build': 'E1031_UNI_API5_18532394_R1', 'Ack': 'Failure', 'Timestamp': '2017-09-25T18:48:34.353Z', 'Version': '1031'}发布于 2018-08-24 20:30:27
在第3行,你会想要改变你的域名从易趣美国到英国。我认为发生的事情是,你正在发送一本字典,要求提供英国数据,但你却把这个请求发送到了美国网站。
从这开始
domain='api.sandbox.ebay.com'到这个
domain='sandbox.ebay.co.uk'我想我对我对你的问题的答案很有信心,但这可能不是正确的联系本身。如果您查看您的开发商帐户,您应该能够看到您的国家的链接。
https://stackoverflow.com/questions/46446049
复制相似问题