我已經訂購了來自亞馬遜賣家中心的此交易報告,因爲無法從報告的API請求。 現在我正在嘗試使用可正常工作的報告api來下載此報告,但現在我正在嘗試將報告類型設置爲「_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_」,以便僅爲這種類型的報告獲取請求的報告列表。 我使用下面的代碼,但它給我這個錯誤如何設置亞馬遜MWS報告api的報告類型
"Fatal error: Call to a member function getType() on a non-object in /AmazonAPI/ReportsAPIClass/src/MarketplaceWebService/Client.php on line 1605"
$config = array(
'ServiceURL' => $serviceURL,
'ProxyHost' => null,
'ProxyPort' => -1,
'MaxErrorRetry' => 3,
);
$service = new MarketplaceWebService_Client(
$AWS_ACCESS_KEY_ID, $AWS_SECRET_ACCESS_KEY, $config, $APPLICATION_NAME, $APPLICATION_VERSION);
//===========================GETS REPORT ID
$request_report_list = new MarketplaceWebService_Model_GetReportListRequest();
$request_report_list->setMerchant($MERCHANT_ID);
$request_report_list->setAcknowledged(false);
$request_report_list->setMarketplace($MARKETPLACE_ID);
$request_report_list->setReportTypeList(array("TypeList" => "_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_"));
做工精細「的getType() 「在行號。 1605在Client.php所以從foreach($ reportTypeList-> getType()作爲$ typeIndex => $ type)到「foreach($ reportTypeList作爲$ typeIndex => $ type)」 –