【发布时间】:2019-01-11 21:01:06
【问题描述】:
我正在尝试将跟踪数据添加到订单并收到以下错误:
致命错误:未捕获的异常 'Google_Service_Exception' 带有消息 '{ "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Invalid value for shipInfos: {carrier=ups, shippingId=A69239235, trackingId=1Z302Y375441956420}", "locationType": "other", "location": "" } ], "code": 400, "message": "shipmentInfos 的值无效: {carrier=ups, shippingId=A69239235, trackingId=1Z302Y375441956420}" } } ' 在 /var/www/html/ta2/gsa/vendor/google/apiclient/src/Google/Http/REST.php:118 堆栈跟踪:# 0 /var/www/html/ta2/gsa/vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(对象(GuzzleHttp\Psr7\Response), 对象(GuzzleHttp\Psr7 \Request), 'Google_Service_...') #1 [内部函数]: Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #2 /var /www/html/ta2/gsa/vendor/google/apiclient/src/Google/Task/Runner.php(176): call_user_func_array(Array, Array) #3 /var/www/html/t 118 行 /var/www/html/ta2/gsa/vendor/google/apiclient/src/Google/Http/REST.php 中的 a2/g
我已尝试提交其他值并继续收到类似错误。
$shipmentInfo = new Google_Service_ShoppingContent_OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo();
$shipId = "A".mt_rand();
$shipmentInfo->setShipmentId("{$shipId}");
$shipmentInfo->setCarrier("ups");
$shipmentInfo->setTrackingId("{$orderRec[$skuRec]}");
对我在这里做错了什么有什么想法吗?
附:出于隐私原因,我更改了此处发布的跟踪号。
【问题讨论】: