I thing there is an error when combine OrderStatus Descending in GetOrdersRequestType and then add Pagination.
The ordering of the results is correct, but in page 1 returns the older orders instead of new ones.
Here is my code:
$args = array(
"OrderStatus" => "Completed",
"OrderStatus" => "All",
"SortingOrder" => "Descending",
"CreateTimeFrom" => new \DateTime('2016-01-01'),
"CreateTimeTo" => new \DateTime(),
);
$getOrders = new Types\GetOrdersRequestType($args);
$getOrders->RequesterCredentials = new Types\CustomSecurityHeaderType();
$getOrders->RequesterCredentials->eBayAuthToken = $config['production']['authToken'];
$getOrders->IncludeFinalValueFee = true;
$getOrders->Pagination = new Types\PaginationType();
$getOrders->Pagination->EntriesPerPage = 20;
$pageNum = 1;
I thing there is an error when combine OrderStatus Descending in GetOrdersRequestType and then add Pagination. The ordering of the results is correct, but in page 1 returns the older orders instead of new ones. Here is my code: $args = array( "OrderStatus" => "Completed", "OrderStatus" => "All", "SortingOrder" => "Descending", "CreateTimeFrom" => new \DateTime('2016-01-01'), "CreateTimeTo" => new \DateTime(), );
$getOrders = new Types\GetOrdersRequestType($args); $getOrders->RequesterCredentials = new Types\CustomSecurityHeaderType(); $getOrders->RequesterCredentials->eBayAuthToken = $config['production']['authToken']; $getOrders->IncludeFinalValueFee = true; $getOrders->Pagination = new Types\PaginationType(); $getOrders->Pagination->EntriesPerPage = 20; $pageNum = 1;
$getOrders->Pagination->PageNumber = $pageNum; $response = $service->getOrders($getOrders);
echo '
';