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

Z0q*_*Z0q 4 php api payment-gateway laravel mollie

redirectURL似乎没有向后发布任何数据。似乎使用了GET请求。如何知道返回URL上的付款ID或付款状态?

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

小智 5

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,
]);
Run Code Online (Sandbox Code Playgroud)