Closed christoph-werker closed 2 years ago
Hi,
Can you share a full code sample so we get a good understanding of your issue?
Hi sander,
There is not much code jet. For example, i create several payments with mollie and all the payments have custom metadata. For example a id from the customer.
Creating the Payments:
Mollie::api()->payments->create(
"method" => 'creditcard',
"locale" => 'de_DE',
"amount" => [
"currency" => "EUR",
]
....
"metadata" => [
"customer" => 123456,
],
...
)
And after a while, i want to get all the payments with the metadata customer = 123456
.
What i've found is, that i can get previous payments by Mollie::api()->payments()->page();
But i dont found a way to get payments with a specific filter like "metadata", "email" …
I hope that this explain my case.
Hi @christoph-werker ,
Mollie does not offer something like a query filter if that's what you are looking for.
The next best thing would be to iterate over the pages (there are next()
and hasNext()
helper methods) and build the resulting array yourself.
Hope that helps.
Dear Team,
i'm struggle to get all Payments by a specific meta_data. I set the User in the Metadata and want to get all previous payments from the User.
I can fetch all the payments without any filter by
Mollie::api()->payments()->page();
but don't found a solution to add a filter.Thanks