#wagamumma_code

1 messages ¡ Page 1 of 1 (latest)

buoyant etherBOT
#

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

📝 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.

frail ermine
#

Nowhere in the code samples does it show what the echo on the server side, so I have just used the same code from the embedded form as below, but whatever I try it just says clientSecret is not defined in the output log in browser
echo json_encode(array('clientSecret' => $checkout_session->client_secret));

trim musk
#

Are you logging the value client-side to see that it's being set?

frail ermine
#

I'm not sure how it is meant to be set quite, the sample code is missing too much stuff to be useful

#

is it possible to upload my files for someone to look at?

trim musk
#

Can you link the doc you're following? The one I'm looking at is complete

frail ermine
trim musk
#

Ah

frail ermine
#

if you look at the server.php code no where is it saying to echo the JSON out

trim musk
#

That is not what I was thinking you were looking at

#

That is still in beta, so the doc might be incomplete

frail ermine
#

it's pretty useless at the moment! is there another way I can do what I need, basically the embedded form option is working perfectly, but because we already have a shopping cart on the website next to it, I just want to remove the products from the embedded form so it's not listing them twice?

#

see how we have the cart on the right, so we don't want the products listed in the embedded form as well

trim musk
#

Hm why do you need to use the Elements + Checkout Sessions flow? What functionality do you need from that?

frail ermine
#

I was told by another person in discord to use the elements option instead of embedded form, so I can not show the products in the form

#

but I've wasted all morning trying to get it to work and it just doesn't work at all

#

ideally I am happy to use the embedded form, but don't want to list the products in it

#

just a total cost

trim musk
#

The flow you linked is a preview flow. Is there a specific reason you need that flow specifically?

#

Why not use the payment element by itself?

frail ermine
#

Only because the support on here told me to, I do not understand the difference is there a different option I need to look at?

trim musk
#

It's a pretty specific flow you linked

#

Our basic accept a payment guide might be sufficient for you

frail ermine
#

is this the normal way to integrate into an ecommerce website then?

#

not the embedded form way?

frail ermine
#

right ok thank you I will try this instead!

trim musk
#

Sounds good

#

Let us know if you have trouble

#

This only will render a payment element on your checkout page

#

That way you can control/customize the rest of the page

#

And the checkout items won't be duplicated

frail ermine
#

and I can still include apple pay element with this?

trim musk
frail ermine
#

ok that sounds perfect then I will give it a go, thanks for the help

trim musk
#

No problem

frail ermine
#

do you know if there is a github sample project or anything for this just so I know I'm doing it right?

trim musk
#

There's a quickstart you can download

#

One sec

#

What backend language?

#

PHP?

#

You can click the download full app button

#

If you want to change the client-side framework and backend lang, you can use the buttons at the top to toggle what you want before downloading