#cinder06

1 messages · Page 1 of 1 (latest)

crystal forgeBOT
crude kelp
#

@barren radish let's chat here!

crystal forgeBOT
crude kelp
#

@barren radish let's chat here instead of the main channel

#

Adding your message here:

i created a website based on ai generating text when you submit a form i want people pay before see the result prompt

#

@barren radish

#

i created a checkout session node js and hosted in heroku this is fir the server side for the client side i m struggling

barren radish
#

ok then what im looking for is before people see the result when they click the generating button it submitt the form and in the same time redirect to stripe and when the payment is made people are redirected back to the website to see the result prompt

#

i created a nodejs file to create a checkout session id for the server side hosted in heroku and for the client side i create a javascriptcode on webflow

stoic flower
#

Hi, what's your question? It sounds like you have some amount of a Checkout integration already. Is something not working as expected?

barren radish
#

yes the pb is when i click the generated copy button nothing happens im using make.com where i start an automation after clickcing the button through a webhook i want to know where is the mistake

stoic flower
#

We're not very familiar with Heroku or make.com, so we may not be able to help much. Can you give a step-by-step explanation of what you're doing? The details you're giving are very sparse and hard to follow

barren radish
#

ok i can show you the code to understand

stoic flower
#

No, i need a step-by-step explanation

#

The code isn't necessary yet

barren radish
#

ok i made a website based on ai when you go to the website you will respond to some question after that you click a submitt button that will generate in my case is facebook ad copy

#

i made an automation on make where the submitt button will start an automation after i will get a response back on the website do you understand ?

stoic flower
#

Unfortunately not. This is a really fuzzy and difficult to understand. It has almost no details about how you're doing any of this.

barren radish
#

ok This code provides a basic form that allows users to enter information about a product and generates a prompt to create a Facebook ad copy based on that information. The form includes fields for the product name, category, target audience, tone, features, and description.

Once the user submits the form, the code sends a request to a webhook URL (https://hook.us1.make.com/umt11vx6
) with the prompt and max_tokens data. The webhook will process this data and generate a Facebook ad copy of 100 words based on the input provided.

The code also includes functionality to process a Stripe payment if the user chooses to pay for the service. When the user clicks the "Pay with Stripe" button, the code updates the value of the hidden stripe_payment input field to "true" and submits the form. If the value of the stripe_payment field is "true" when the form is submitted, the code will call the Stripe API to initiate the checkout process.

stoic flower
#

Okay, and you've been able to create the Checkout Session this way already?

barren radish
#

yes i created the checkout session but there is a pb i think with the front end

stoic flower
#

What's pb mean?

barren radish
#

when i click the submit button it should redirect me to the stripe page and when the payment is sucessfull then people are redirected back to the website to see the result prompt and get the response but when i click its not working nothing happens

stoic flower
barren radish
#

yes is created and i have code 200

#

thats the session is created and there is no errors

stoic flower
#

Okay, so how are you handling the redirect?

#

The Checkout Session has a url attribute that you can use for redirects

barren radish
#

yes

stoic flower
#

How are you redirecting?

#

Do you see any errors in the browser console?

barren radish
#

when i click the submitt button it redirect me to the stripe page i created a payment link for the product and make a front end javascript code where i adda a condition when people pay if the sucess url is true then they shoulg be redirected from stripe to the website again to see the result prompt

#

but the pb is that you the payment is made it not redirected me back

#

when

stoic flower
#

What does "pb" mean?

barren radish
#

problem

stoic flower
#

Okay, and do you see errors in the browser console?