EBay API - GerOrders not producing any results

I am trying to understand why my GetOrders function for the eBay API is not working. Below are the headers that I pass (this is in Perl):

$objHeader->push_header('X-EBAY-API-COMPATIBILITY-LEVEL' => $compatabilityLevel);
$objHeader->push_header('X-EBAY-API-DEV-NAME' => $devID);
$objHeader->push_header('X-EBAY-API-APP-NAME' => $appID);
$objHeader->push_header('X-EBAY-API-CERT-NAME' => $certID);
$objHeader->push_header('X-EBAY-API-CALL-NAME' => 'GetOrders');
$objHeader->push_header('X-EBAY-API-SITEID' => '3');
$objHeader->push_header('Content-Type' => 'text/xml');

      

... and the XML I'm passing looks like this:

<?xml version="1.0" encoding="utf-8" ?>
    <GetOrdersRequest xmlns="urn:ebay:apis:eBLBaseComponents">
    <DetailLevel>ReturnAll</DetailLevel>
    <NumberOfDays>3</NumberOfDays>
    <OrderRole>Seller</OrderRole><OrderStatus>Active</OrderStatus>
    <RequesterCredentials><eBayAuthToken>$userToken</eBayAuthToken></RequesterCredentials>
    </GetOrdersRequest>

      

(obviously $ userToken is replaced by my actual user token)

I receive a refund from him:

$VAR1 = {
          'xmlns' => 'urn:ebay:apis:eBLBaseComponents',
          'Build' => 'E929_CORE_APIXO_17568878_R1',
          'PageNumber' => '1',
          'PaginationResult' => {
                                'TotalNumberOfPages' => '0',
                                'TotalNumberOfEntries' => '0'
                              },
          'OrderArray' => {},
          'Ack' => 'Success',
          'HasMoreOrders' => 'false',
          'Timestamp' => '2015-06-29T09:49:25.963Z',
          'Version' => '929',
          'ReturnedOrderCountActual' => '0',
          'OrdersPerPage' => '100'
        };

      

.. but as you can see, no results. I know there are results (I've worked with the PHP API already using the same values ​​as far as I can tell). In the worst case, I could create a basic PHP script to capture the results and then plug into the Perl script. Obviously this is not ideal though (I would prefer it all in the same programming language)

Does anyone have any idea? I am drawing a space: /

+3


source to share


1 answer


Okay, I knew this was going to happen. 2 days of battling this and then as soon as I post something I find a solution :)

The problem was that I was passing the following in XML:

<OrderStatus>Active</OrderStatus>



In fact, it should be:

<OrderStatus>Completed</OrderStatus>

Now this grabs them perfectly :)

+2


source







All Articles