redirectURL似乎没有将任何数据发回。它似乎使用了GET请求。如何知道返回URL上的支付ID或支付状态?
$payment = \mollie::api()->payments()->create([
'amount' => $price,
'customerId' => $customer->id,
'description' => 'My Initial Payment',
'redirectUrl' => \URL::to('/after-payment'),
]);发布于 2017-04-18 09:13:39
编辑:正如评论中指出的,我是在谈论webhook。马克的答案是正确的,因为他描述的是重定向网址.
正如莫利博士中所述,POST请求是用一个参数id=tr_xxxxxx发送的。您是发送301或302重定向头吗?在这种情况下,post数据丢失,您将收到一个GET请求。
请注意,如果需要重定向,始终可以将自己的事务标识符添加到web钩子URL。
发布于 2018-03-10 15:46:11
Daan描述的POST请求仅用于web钩子。Mollie将使用GET请求重定向到您的网站,以获得您提供的redirectUrl。没有数据发送回您的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,
]);https://stackoverflow.com/questions/43430102
复制相似问题