When calling the checkout session creation :
\Stripe\Stripe::setApiKey(env('STRIPE_SECRET'));
$checkout_session = \Stripe\Checkout\Session::create([
'line_items' => [
[
'price_data' => [
'currency' => $currency,
'product_data' => [
'name' => token_symbol() . ' Token',
],
'unit_amount_decimal' => ($trnx_amount / $token)*100
],
'quantity' => $token
]
],
'mode' => 'payment',
'success_url' => route('payment.stripe.success'),
'cancel_url' => route('stripe.cancel')
]);
The Stripe payment form does not have a cancel button even after clicking the "Pay" button. So what is the circumstance where the cancel_url is called ?
>Solution :
You customer will be directed to cancel_url when they click the back button on the Checkout page. Read the API reference for more details.