2
我試圖從V2 API獲取訂單信息。但是沒有一種銷售方式似乎有效。Magento SOAP API v2,無法獲取訂單信息
我: - 查看WSDL - 連接/登錄成功(用戶擁有所有資源訪問) - 呼叫很多方法(非銷售訂單有關的),看看結果
連接代碼:
$client = new SoapClient('http://mywebsitedomain/index.php/api/v2_soap?wsdl=1');
$session = $client->login('myuser', 'mypassword');
工作電話:
$result = $client->customerCustomerList($session);
$result = $client->directoryCountryList($session);
$result = $client->catalogProductAttributeList($session); //returns empty array
$result = $client->magentoInfo($session);
$result = $client->catalogCategoryTree($session);
非工作電話:
$result = $client->salesOrderInfo($session, '100022209'); //valid order number
$result = $client->salesOrderList($session);
錯誤收到非工作電話:
Uncaught SoapFault exception: [3] Invalid api path
也試過不同的呼叫格式:
$params = array('filter' => array(
array('key' => 'status', 'value' => 'pending'),
array('key' => 'customer_is_guest', 'value' => '1')
));
$result = $client->salesOrderList($session, $params);
有誰知道爲什麼似乎在銷售相關的方法並不在這裏工作?