#wagamumma_code
1 messages ¡ Page 1 of 1 (latest)
đ 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.
- wagamumma_best-practices, 3 hours ago, 37 messages
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));
Are you logging the value client-side to see that it's being set?
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?
Can you link the doc you're following? The one I'm looking at is complete
Ah
if you look at the server.php code no where is it saying to echo the JSON out
That is not what I was thinking you were looking at
That is still in beta, so the doc might be incomplete
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
Hm why do you need to use the Elements + Checkout Sessions flow? What functionality do you need from that?
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
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?
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?
It's a pretty specific flow you linked
Our basic accept a payment guide might be sufficient for you
is this the normal way to integrate into an ecommerce website then?
not the embedded form way?
It's the most common
right ok thank you I will try this instead!
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
and I can still include apple pay element with this?
The payment element can handle apple pay, yes: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements#apple-pay-and-google-pay
ok that sounds perfect then I will give it a go, thanks for the help
No problem
do you know if there is a github sample project or anything for this just so I know I'm doing it right?