'How to force 3ds in stripe?
I'm doing simple checkout in stripe but I have to add 3dsecure auth in it so that customer is forced for 3d-secure authentication. Upon checking stripe I came to know that I can add and set request_three_d_secure to any and it would then force 3ds authentication. But as soon as I add that option to my code it is resulting in an error:
My code number is following:
$session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'payment_method_options' => [
'card' => [
'request_three_d_secure' => 'any'
]
],
'line_items' => [[
'name' => $settings["site_name"],
'description' => $settings["site_name"] . " Order No: " . $a0["ordr_id"],
'amount' => str_replace(".", "", $a0["ordr_total"]),
'currency' => 'gbp',
'quantity' => 1,
]],
'success_url' => $settings["site_url"] . 'ipn-stripe.php?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => $settings["site_url"] . 'payment.php?id=' . $a0["ordr_id"],
]);
Please help me as to why this is resulting in an error and as soon as I remove the payment_method_options it works fine.
Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
