Last active
June 23, 2019 06:15
-
-
Save sohelaman/b8a22a5dd1cc17945b6d8884a66c9f25 to your computer and use it in GitHub Desktop.
[Magento 1] Magento 1.x #magento #php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $client = new SoapClient('https://api.example.com/api/v2_soap?wsdl=1'); | |
| $session = $client->login('username', 'password'); | |
| $orders = ['100193253', '100193224', '100193291', '100193320']; | |
| $increment_id = '100193224'; | |
| /*$params = [ | |
| 'filter' => [ | |
| ['key' => 'increment_id', 'value' => '100193253'], | |
| ], | |
| ];*/ | |
| $params = [ | |
| 'complex_filter' => [ | |
| [ | |
| 'key' => 'increment_id', | |
| 'value' => [ | |
| 'key' => 'in', | |
| 'value' => implode(',', $orders), | |
| ], | |
| ], | |
| /*[ | |
| 'key' => 'protect_code', | |
| 'value' => [ | |
| 'key' => 'eq', | |
| 'value' => 'ebb2a0', | |
| ], | |
| ],*/ | |
| ], | |
| ]; | |
| // $result = $client->salesOrderList($session, $params); | |
| foreach ($orders as $increment_id) { | |
| $result = $client->salesOrderInfo($session, $increment_id); | |
| var_dump($result->increment_id); | |
| var_dump($result->status_history); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment