#mangeshsm_docs

1 messages ¡ Page 1 of 1 (latest)

visual basinBOT
#

👋 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/1291352044623368255

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

ashen tinsel
#

hi! what is your question?

dawn frost
#

I want to create a functionlaity in that -
Able to provide E Gift card to user with the help of Strip Payment.
#nontechnical #nocodingquestion

ashen tinsel
#

what code have you written to attempt that so far that you're stuck with?

#

if you are not a developer with a question about code, we can not help you on this server.

visual basinBOT
dawn frost
#

Thanks for attempt.

Can you Please help me what is wrong with this ?
const stripe = require('stripe')('your_stripe_secret_key');
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: 'E-Gift Card',
},
unit_amount: 5000, // $50.00
},
quantity: 1,
},
],
mode: 'payment',
success_url: 'https://your-domain.com/success?session_id={CHECKOUT_SESSION_ID}',
cancel_url: 'https://your-domain.com/cancel',
});

slate zealot
#

hi! I'm taking over this thread.

#

that code looks correct. is it returning an error?

dawn frost
#

Without any error or any response

slate zealot
#

did you try to log the session variable?

dawn frost
#

Session variables getting before API call not after

slate zealot
#

I don't understand. the response of the API call is stored in the session variable. so just add console.log(session) in your code to see the API response.

dawn frost
#

{CHECKOUT_SESSION_ID}' not this session.
There i have couple session varibles

slate zealot
#

are you a software developer?

dawn frost
#

Yes ,why ?

slate zealot
#

then can you add to your code console.log(session) and share the response here?

dawn frost
#

Sorry i cant share screenshots or something like.
As i mentioned no response ? what is meant of that?
Hope you understand.

#

Btw thanks for your time, i don;t feel to move further.
#closethread