這是我打入ebay的XML。除了沒有付款完成的項目(我已閱讀我應該回來),我會獲得所有已完成的項目。eBay API GetOrdersRequest未顯示正在等待支付的項目
我寧願有一個方法,只叫「等待付款」,「等待航運」,「發貨」。如果這是可能的,我不知道從我的研究。目前,我正在收集所有完成ñ天和過濾出來自己
端點:
https://api.ebay.com/ws/api.dll
XML:
foreach($orderArray as $order)
{
$paidTime = (isset($order['PaidTime']) ? $order['PaidTime'] : '');
$shippedTime = (isset($order['ShippedTime']) ? $order['ShippedTime'] : '');
if($paidTime != ""){
if($shippedTime == "")
array_push($itemPaidNotShipped,$order);
else
array_push($itemPaidShipped,$order);
}else{
array_push($itemNotPaidNotShipped,$order);
}
}
:在整理
<?xml version='1.0' encoding='utf-8'?>
<GetOrdersRequest xmlns='urn:ebay:apis:eBLBaseComponents'>
<RequesterCredentials>
<eBayAuthToken>$requestToken</eBayAuthToken>
</RequesterCredentials>
<OrderRole>Seller</OrderRole>
<OrderStatus>Completed</OrderStatus>
<Pagination>
<EntriesPerPage>100</EntriesPerPage>
<PageNumber>$page</PageNumber>
</Pagination>
<NumberOfDays>7</NumberOfDays>
<ErrorLanguage>en_US</ErrorLanguage>
<Version>823</Version>
<WarningLevel>High</WarningLevel>
</GetOrdersRequest>
邏輯
編輯後接受的答案,這裏是我的排序邏輯:
foreach($orderArray as $order){
$paidTime = (isset($order['PaidTime']) ? $order['PaidTime'] : '');
$shippedTime = (isset($order['ShippedTime']) ? $order['ShippedTime'] : '');
$orderStatus = (isset($order['OrderStatus']) ? $order['OrderStatus'] : '');
if($orderStatus != "" && $orderStatus != 'Cancelled'){
if($paidTime != ""){
if($shippedTime == "")
array_push($itemPaidNotShipped,$order);
else
array_push($itemPaidShipped,$order);
}else{
array_push($itemNotPaidNotShipped,$order);
}
}
}
那麼問題是什麼? –
問題是,文檔說我應該得到AwaitingPayment,而我不是。所以無論我做錯了什麼,或者我該如何做到這一點? – Andrew