我目前正在尝试向eBay发送信息以设置订单出货/跟踪详情。目前我获得了成功'消息,但在eBay的网站上没有更新信息。
我一直在使用以下链接指导我实施此更改:
http://developer.ebay.com/devzone/large-merchant-services/Concepts/MakingACall.html
http://developer.ebay.com/devzone/merchant-data/CallRef/SetShipmentTrackingInfo.html#Samples
我发回的XML的格式与所描述的格式完全相同,请参阅下面我发送的详细信息以及用于通过eBay的API通过CURL发送的PHP。
XML:
<?xml version="1.0" encoding="UTF-8"?>
<BulkDataExchangeRequests>
<Header>
<Version>591</Version>
<SiteID>0</SiteID>
</Header>
<SetShipmentTrackingInfoRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<OrderID>261671515555-0</OrderID>
<OrderLineItemID>261672341232</OrderLineItemID>
<Shipment>
<ShipmentTrackingNumber>JD0002250296232332</ShipmentTrackingNumber>
<ShippedTime>2014-11-27T14:41:27\Z</ShippedTime>
<ShippingCarrierUsed>Yodel</ShippingCarrierUsed>
</Shipment>
</SetShipmentTrackingInfoRequest>
</BulkDataExchangeRequests>
PHP:
$xml_request = "";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $ebay_url);
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $xml_request);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($connection);
curl_close($connection);
var_dump($response);
答案 0 :(得分:0)
问题是API的提供者有间歇性的发布。