Feb 8, 2022
0
Level 14
Route Not working with Stripe
I am trying to pass the checkout session id to have a customized checkout page on stripe (https://stripe.com/docs/payments/checkout/custom-success-page).
When I pass the route in as a string it works great no problems:
'success_url' => "https://example.test/checkout/success?session_id={CHECKOUT_SESSION_ID}",
but if I use the route helper it returns:
'https://example.test/checkout/success?session_id=%7BCHECKOUT_SESSION_ID%7D'
instead of the correct session id
'success_url' => route('checkout.success', ['session_id' => '{CHECKOUT_SESSION_ID}']),
Any tips?
Please or to participate in this conversation.