我正在与 Stripe Payment Gateway 集成 - 最新版本的 API。
除了“client_reference_id”没有传递给 webhook 或事务(没有出现在日志中)之外,这一切都在工作 - 我需要它来更新数据库中的订单。
我的代码是:
$session = \Stripe\Checkout\Session::create([
'billing_address_collection' => 'required',
'payment_method_types' => ['card'],
'line_items' => [[
'amount' => 1011,
'currency' => 'GBP',
'name' => 'Purchase',
'description' => 'test',
'quantity' => 1,
]],
'client_reference_id' => 'TEST1111223',
'mode' => 'payment',
'success_url' => 'https://example.com/success',
'cancel_url' => 'https://example.com/cancel'
]);
Run Code Online (Sandbox Code Playgroud)
根据文档,应该通过:https://stripe.com/docs/api/checkout/sessions/create
难道我做错了什么?
其他人问了同样的问题但没有得到回答:“client_reference_id”参数未传递