} else { break; } } if (is_file($xmlFile)) { $requestXml = file_get_contents($xmlFile); $xmlResult = xml_to_array($requestXml); if (isset($xmlResult['AmazonEnvelope']['Message']['ProcessingReport']['StatusCode'])) { $errStatus = $xmlResult['AmazonEnvelope']['Message']['ProcessingReport']['StatusCode']; if (isset($xmlResult['AmazonEnvelope']['Message']['ProcessingReport']['StatusCode']['Result'][0]['ResultCode']) && $xmlResult['AmazonEnvelope']['Message']['ProcessingReport']['StatusCode']['Result'][0]['ResultCode'] == 'Error') { $errMsg = $xmlResult['AmazonEnvelope']['Message']['ProcessingReport']['StatusCode']['Result'][0]['ResultDescription']; errorLog(implode(',', $orderIds) . ': ' . $errMsg . "", 'N'); continue; } if ($errStatus == 'Complete') { $status = update_order_shippedmarked_time($orderIds, $mctime); if (!$status) { $msg = implode(',', $orderIds) . ':数据库的状态更新失败'; errorLog($msg, 'N'); } errorLog(implode(',', $orderIds) . ': Upload tracking number success ', 'Y'); } else { errorLog(implode(',', $orderIds) . ': Upload tracking number Failure a', 'N'); } } else { errorLog(implode(',', $orderIds) . ': Upload tracking number Failure b', 'N'); } } else { errorLog(implode(',', $orderIds) . ': Upload tracking number Failure c', 'N'); } /***************begin----- 检测跟踪号状态*******************/
$send_type = "all"; $total_empty = 0; foreach ($data as $v) { if (empty($v['ShippedTime'])) { //存在未发货的 $total_empty++; } } if ($total_empty > 1) { $send_type = "part"; } //echo $account." || ".$val['recordNumber']." || ".$serviceName." || ".$trackno." || ".$send_type." || ".$no_set_shipping_flag." || ". $Website; $ret = sellerShipment($account, $val['recordNumber'], $serviceName, $trackno, $send_type, $no_set_shipping_flag, $Website); //print_r($ret); if ($ret) { update_order_shippedmarked_time($update_ebay_id, $mctime, $ret); } } exit('fffff'); } } echo "-------------------end " . date("Y-m-d H:i:s") . "------------------------\n"; exit; function get_surface_trackno($ebayid, $packingstatus) { global $dbConn; global $transportData; //运输方式 //ebay_account 为新系统的 accountId; //ebay_userid 为新系统的 platformUsername //$sql = "SELECT ebay_countryname,ebay_state,ebay_city,ebay_postcode,ebay_carrier,ebay_account,ebay_userid,ebay_usermail FROM ebay_order WHERE ebay_id='{$ebayid}'";