So, this morning I stated the following in the coffee-chat.
Good morning... Even before my first cup of coffee this morning; "so we cannot see our paymentrequests listed, we can create them, but not get them listed. App works, but api doesn't". Update: seems that I cannot list by a limit of 100 (from = null, $limit = 100, $parameters = array()). 50 works, 250 works... Weird. Problem solved for us, still weird issue
So I went investigating the issue since status.mollie.com showed everything operting normally. I'm using the GitHub Mollie PHP package 2.73.0 (latest and 3 weeks old).
So in my code I have a constructor, constructing the MollieApiClient(), providing it with the right APIKey and then we can get started.
When I request the paymentLinks->page() everything works normally as long as I call it without parameters.
But as soon as I set the $from = null, $limit = 100, $parameters = array() it goes boom.
Below is my code we're talking about. As soon as I change the $limit to 50, 200 or 250 it works. But the higher the number the slower the page gets. For instance 101 doesn't work eather. I gives an exception that the limit should be between 2 and 250. Now, I know it's weekend, I know I'm not the fittest currently, but I thought 100 and 101 where between 2 and 250? Right?
` public function connect(): Mollie
{
try {
$this->instance = new MollieApiClient();
$this->instance->setApiKey($this->mollieProfile->getAPIKey());
} catch (ApiException $e) {
}
return $this;
}
public function listPaymentRequests(string $from = null, int $limit = 100, array $parameters = array()): ?PaymentLinkCollection
{
try {
return $this->instance->paymentLinks->page($from, $limit, $parameters);
} catch (ApiException $e) {
return null;
}
}
`