#Amos
1 messages · Page 1 of 1 (latest)
Hi, let's talk here
I'm not sure what you're asking
are the key names are still being used?
What does this mean?
@sacred plinth please use this thread to chat
Hi, thanks for the help. I mean is below call still valid?
checkout_session = \Stripe\Checkout\Session::create([
'payment_method_types' => ['card'],
'line_items' => [[
'price_data' => [
'currency' => 'usd',
'unit_amount' => $_SESSION["price"] * 100,
'product_data' => [
'name' => $_SESSION["course_fullName"],
'images' => ["stripe.jpg"],
],
],
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => $YOUR_DOMAIN . '/portal/paid.html',
'cancel_url' => $YOUR_DOMAIN . '/enroll',
]);
Or, I have to create products on the dashboard, and go with below example code by Product ID:
$checkout_session = \Stripe\Checkout\Session::create([
'line_items' => [[
# Provide the exact Price ID (e.g. pr_1234) of the product you want to sell
'price' => '{{PRICE_ID}}',
'quantity' => 1,
]],
'mode' => 'payment',
'success_url' => $YOUR_DOMAIN . '/success.html',
'cancel_url' => $YOUR_DOMAIN . '/cancel.html',
'automatic_tax' => [
'enabled' => true,
],
]);
I still have no idea what you're asking. What happens when you run the code?
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
In the Stripe prebulit example code, it only goes Price ID. But, previously, we can have "price_data, product data" etc