Closed ShafiKh closed 2 years ago
Hi @ShafiKh ,
In that same codedocumentation you'll find php examples that can be used with this package. What have you tried so far?
@sandervanhooft I haven't tried because i can't attach ?include=details.qrCode
to the API call, how can i attach ?include=details.qrCode
to the API call? sorry i am understanding it wrong
I just tried it, here is the payload :
$payment = Mollie::api()->payments->create([
"amount" => [
"currency" => "EUR",
"value" => "1.20"
],
"description" => "Order #" . $invoice->id,
"redirectUrl" => 'redirect URL',
"webhookUrl" => 'webhook URL',
"method" => "ideal",
"metadata" => [
"order_id" => 123123,
],
[
"include" => "details.qrCode",
]
]);
It is returning this :
{"error":{"message":"[2022-08-24T18:52:04+0000] Error executing API call (422: Unprocessable Entity): Non-existent body parameter \"0.include\" for this API call. Did you mean: \"locale\"?. Field: 0.include. Documentation: https:\/\/docs.mollie.com\/overview\/handling-errors"}}
Made it working, had to move this :
[ "include" => "details.qrCode", ]
outside of the first array.
Thanks, good work
Try
$filters = ["include" => "details.qrCode"];
$payment = Mollie::api()->payments->create($payload, $filters);
Yep, that's better, thanks
As per the documentation, calling the following API will return a
qrCode
object in thedetails
objectPOST https://api.mollie.com/v2/payments?include=details.qrCode
.How can I achieve that?