When I tried to use the nextPageLink retrieved from the first request for the next pagination request, 500 error response received.
Sample request code,
$listPaymentsData = new ListPaymentsData([
'nextPageUrl' => "https:\/\/global-api.afterpay.com\/v2\/payments?cursor=FooBarAyNDA2MTYJUSNQxMDIwLjEwOVo%3D%3AMDAxLnN2Z3Vnbmc4bWxrYzYyZWxyMnZkMXBmb3JzdW11NDc0NDc0bXJvMHZzbjBhcXN1aw%3D%3D&statuses=APPROVED&fromCreatedDate=2024-06-03T14%3A05%3A15+10%3A00&includeNextLink=true&toCreatedDate=2024-06-11T14%3A25%3A15+10%3A00",
]);
$result = resolve(AfterpayApiService::class)->listPayments($listPaymentsData);
Response:
HTTP request returned status code 500:
{
"errorCode" : "error",
"errorId" : "9940463abf9b1a1e",
"message" : "An error occurred processing your request",
(truncated...).
Note that the nextPageUrl contains statuses, fromCreatedDate, toCreatedDate. If I remove them and just keep the cursor parameter, it works. Is it this intended and safe to remove those parameters for pagination request?
When I tried to use the
nextPageLinkretrieved from the first request for the next pagination request, 500 error response received.Sample request code,
Response:
Note that the nextPageUrl contains statuses, fromCreatedDate, toCreatedDate. If I remove them and just keep the
cursorparameter, it works. Is it this intended and safe to remove those parameters for pagination request?