gpt4 book ai didi

php - 如何在 redirecturl 中显示 Mollie 订单状态?

转载 作者:可可西里 更新时间:2023-11-01 00:12:37 25 4
gpt4 key购买 nike

redirectURL 似乎没有回传任何数据。它似乎使用 GET 请求。我如何知道返回 URL 上的付款 ID 或付款状态?

$payment = \mollie::api()->payments()->create([
'amount' => $price,
'customerId' => $customer->id,
'description' => 'My Initial Payment',
'redirectUrl' => \URL::to('/after-payment'),
]);

最佳答案

Daan 描述的 POST 请求仅适用于 webhook。 Mollie 将使用对您提供的 redirectUrl 的 GET 请求重定向回您的网站。没有数据发送回您的 redirectUrl,但是您可以将您的付款/发票 ID 添加到 redirectUrl 中的 GET 参数:

$payment = \mollie::api()->payments()->create([
'amount' => $price,
'customerId' => $customer->id,
'description' => 'My Initial Payment',
'redirectUrl' => \URL::to('/after-payment').'?invoice_id='.$invoice->id,
]);

关于php - 如何在 redirecturl 中显示 Mollie 订单状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43430102/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com