#z3ntl3_checkout-embedded
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/1263172555250995345
๐ 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.
- z3ntl3_connect-dashboard, 1 day ago, 11 messages
- z3ntl3_api, 1 day ago, 9 messages
injected iframe but i dont see anything
it gave me this errro
nd im ngrok tunneling
@clever wigeon yeah the bug is on Google's end as far as I know. And that warning is there all the time you can ignore it
So really we should focus on what the exact issue is I think
normally it should render embedded checkout form but it didnt even tho i see an injected iframe in my html
can u pls help
z3ntl3_checkout-embedded
I can try for sure. I need more than just pictures though, especially of code.
Did this work before and stop working? Is this your first time? Can you give me an exact Checkout Session id that you created on the server?
i had set the same thing up previously without anything going wrong, this time it did nothing
i can show some code
so creating a checkout session, and adding the secret to sid qs
please don't share pictures of code
please read my messages
ctx.Redirect(
302,
fmt.Sprintf(
"%s/betaling/?sid=%s",
viper.GetString("FRONTEND"),
base64.StdEncoding.EncodeToString([]byte(sess.ClientSecret)),
),
)
Okay why are you creating then redirecting to embed instead of loading the page and then retrieving the client_secret?
<!-- main container -->
<div
x-data
:class='{"hidden": !$store.loaded, "block": $store.loaded}'
class="hidden container-fluid mx-auto"
id="checkout"
>
</div>
<script>
var stripe
const init = async () => {
let {data} = await axios({
method: "GET",
url: BASE_URL + "/api/accountid"
})
stripe = Stripe("pk_test_51MnMLLHwRrNToxWzG0B8XOXYaKLah6NCQfNLj7uUeqGsvoC2GFqtKWSNi3CxfASB7CqBxnW8HWGT3nXAMukzTei800xhCVOE4b", {
stripeAccount: data.data,
})
let sid = new URL(window.location.href).searchParams.get("sid")
const checkout = await stripe.initEmbeddedCheckout({
clientSecret: atob(sid),
});
checkout.mount('#checkout');
}
init()
</script>
I've never seen anyone do something like this before
i dont want to make much ajax request on /betaling it should just consume the querystring and directly use the sid to initialize the embedded iframe checkout
thats why
Also what is clientSecret: atob(sid), and why are you doing this? It feels likely that's the issue honestly because you change the format.
Can you try hardcoding a client secret there to see if that works?
oke
still didnt work
s_test_a1gyO3B2GJa7rNwv35EXahGJPCoVlmHJw2CocW5COKTYjY3ctdwsgTP4aN_secret_fidwbEhqYWAnPydgaGdgYWFgYScpJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ3dgYWx3YGZxSmtGamh1aWBxbGprJz8nZGlyZHx2JyknZ2RmbmJ3anBrYUZqaWp3Jz8nJjRjNzw2Mid4JSUl
it injects btw
but i dont seee any iframe
You have an invalid character somewhere here though
ah you're just missing the leading c did you do a bad copy-paste?
oh i forgot it on my copy paste, but the cs was there on the test
cs_test_a1gyO3B2GJa7rNwv35EXahGJPCoVlmHJw2CocW5COKTYjY3ctdwsgTP4aN_secret_fidwbEhqYWAnPydgaGdgYWFgYScpJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ3dgYWx3YGZxSmtGamh1aWBxbGprJz8nZGlyZHx2JyknZ2RmbmJ3anBrYUZqaWp3Jz8nJjRjNzw2Mid4JSUl
oh btw
im so dumb
i have on every page a loader and browser state
i forgot to turn $store.loaded to true after everything got loaded
so it was there but my element was hidden
dumb overlook s
oh gotcha, glad you figured it out, would have taken me a while to find it
ye and sorry just one more question
i got this too
but the color is like dark grey
instead oft his
your love the pictures lol
#051139
Sorry can you share more specific details? I got a picture of a few lines of code with no context. When did you create that account? Where did you set the settings? I see you use Standard accounts which means the connected account can make whatever changes they want in the Dashboard too which might have happened.
But looking
i looked a bit in my code and i see that my update api req on connected account branding doesnt allow binding another FILE to more than one objects or something
so i need to create a new file on stirpe api every time and cant use the same one?
[ERROR] Request error from Stripe (status 400): {"status":400,"message":"That file is already attached to something else.","param":"settings[branding][logo]","request_id":"req_jrwzIy5117kYw0","request_log_url":"https://dashboard.stripe.com/acct_1PNWUvQnBUYiXKHE/test/logs/req_jrwzIy5117kYw0?t=1721235222","type":"invalid_request_error"}
not updated
so why i need to make new files if one already exists (for the same purpose too)
The File ids are one-time use so yes you would upload each time