This topic can no longer be replied to because it has been locked.

SOAP API Bug
Gravatar
Joined: 2017-06-05
Posts: 1
I’ve encountered a bug with the SagePaymentsPro module's API overwrites

Specific to the file: "/app/code/local/Ebizmarts/SagePaymentsPro/Model/Sales/Order/Api.php"

Your module extends the class of Mage_Sales_Model_Order_Api, which is how I came to my issue.

The error is relating specifically to the “public function items()”

This overwrite subsequently prevents out-of-box Magento salesOrderList API filters from functioning as expected.

When I pass documented out of box filters to the SOAP API V2 salesOrderList, all of them are ignored and the entire collection is returned.

It appears the reason this function is overwritten is to add additional payment data to the api object, however in the process, Magento API filtering for orders was removed.

I need to restore stock functionality of the Magento Soap API V2 Sales Order List’s filtration functionality.

Below is a test script which can be used for reference to reproduce the issue.
<?php $url = 'https://www.domain.dev/api/v2_soap/?wsdl'; $client = new SoapClient($url); // If some stuff requires api authentification, // then get a session token $apiUser = 'sampleuser'; $apiKey = 'testuser'; // If some stuff requires api authentification, // then get a session token $session = $client->login($apiUser, $apiKey); $params = array( array('key' => 'state', 'value' => 'complete') ); $complex_params = array ( //array('key' => 'created_at', 'value' => array('key' => 'gteq', 'value' => date('Y-m-d', strtotime('-1 week')))) array('key'=>'created_at','value'=>array('key' =>'from','value' => '2017-01-03 01:01:01')) ); $orders = $client->salesOrderList($session, array('filter' => $params, 'complex_filter' => $complex_params)); var_dump($orders);

NEWSLETTER

Subscribe to our newsletter to receive emails and useful news articles