#yak_api

1 messages ยท Page 1 of 1 (latest)

flint plankBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1224685581972410440

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

acoustic gateBOT
random perch
#

hi there!

lapis cedar
#

Thank you for your help, I will read it

acoustic gateBOT
lapis cedar
#

I pasted the code but i got this error
The return_url parameter can only be used with ui_mode: custom or ui_mode: embedded.
Stripe\Exception\InvalidRequestException: The return_url parameter can only be used with ui_mode: custom or ui_mode: embedded.

#

$checkout_session = \Stripe\Checkout\Session::create([
'line_items' => [[
'price_data' => [
'currency' => 'usd',
'product_data' => [
'name' => 'T-shirt',
],
'unit_amount' => 2000,
],
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => $YOUR_DOMAIN . '/test_pay/Public/success.html',
'return_url' => $YOUR_DOMAIN . '/test_pay/Public/cancel.html',
'automatic_tax' => [
'enabled' => true,
],
]);

#

this is my code

open flume
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

#

do you mean to use Stripe Checkout Sessions?

lapis cedar
#

yes

open flume
#

then you don't have to use return_url

#

instead you use success_url and cancel_url