question

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ Suspended asked

getOrders PHP multiple orderID's,PHP call GetOrders with multiple OrderId's

Hello, I am trying to call GetOrders using PHP. The function is returning correct results for only one order id. e.g. $order_id_string = 'id1'; However, if I use multiple order id's, such as in the string below, it still only returns results for the first id in the string: $order_id_string = 'id1,id2,id3,id4....'; $params = array('Version' => 931, //set the API call parameters 'OrderIDArray'=>array($order_id_string)); $request = return_Ebay_request("GetOrders",$params); **function return_Ebay_request($apiCall,$params){** //return specific calls from Ebay $client = new SOAPClient(EBAY_WSDL_URL, array('trace' => 1, 'exceptions' => 0, 'location' => " https://api.ebay.com/wsapi? callname=$apiCall&appid=EBAY_APP_ID&siteid=0&version=931&Routing=new")); $eBayAuth = array('eBayAuthToken' => new SoapVar(EBAY_TOKEN, XSD_STRING, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents'), 'Credentials' => new SoapVar (EBAY_CREDENTIALS_ARRAY, SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents')); $header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT); $header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents', 'RequesterCredentials', $header_body)); $request = $client->__soapCall($apiCall, array($params), NULL, $header); //make the actual API call return($request); **}** What am I doing wrong? ,Hello, I am trying to call GetOrders using PHP. The function is returning correct results for only one order id. e.g. $order_id_string = 'id1'; However, if I use multiple order id's, such as in the string below, it still only returns results for the first id in the string: $order_id_string = 'id1,id2,id3,id4....'; $params = array('Version' => 931, //set the API call parameters 'OrderIDArray'=>array($order_id_string)); $request = return_Ebay_request("GetOrders",$params); **function return_Ebay_request($apiCall,$params){** //return specific calls from Ebay $client = new SOAPClient(EBAY_WSDL_URL, array('trace' => 1, 'exceptions' => 0, 'location' => " https://api.ebay.com/wsapi? callname=$apiCall&appid=EBAY_APP_ID&siteid=0&version=931&Routing=new")); $eBayAuth = array('eBayAuthToken' => new SoapVar(EBAY_TOKEN, XSD_STRING, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents'), 'Credentials' => new SoapVar (EBAY_CREDENTIALS_ARRAY, SOAP_ENC_OBJECT, NULL, NULL, NULL, 'urn:ebay:apis:eBLBaseComponents')); $header_body = new SoapVar($eBayAuth, SOAP_ENC_OBJECT); $header = array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents', 'RequesterCredentials', $header_body)); $request = $client->__soapCall($apiCall, array($params), NULL, $header); //make the actual API call return($request); **}** What am I doing wrong?
getordersPHPorderid
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.