#cerberusgolem-paymentelement
1 messages ยท Page 1 of 1 (latest)
that email shouldn't cause your Payment Element to not load i believe. Do you have a URL which i can access to take a look at your integration?
code access?
you said yesterday your checkout page stopped loading. Do you have a page or website where your code is deployed?
what are the steps to get to your checkout page?
you need to click on connect wallet.
then it will ask for mnemonic code
enter this:
beach giggle tomorrow type address earth merit battle hip woman hen deliver
password could be anything
then on the top right corner you will see "booking tab"
go to there, and select any option from the dropdown, then your name, then any email and hit checkout button.
๐
onesec, still filling up fields
okay
yep, i see it. Give me a while to look through it
Sure
where are you loading/initializing stripe?
in the index.html file calling that script (stripe.js/v3)
uh
i'm not familiar with angular syntax, but you declare stripe, but you're not initializing it right? As far as i can tell, you commented out the line where it's supposed to load stripe : https://stripe.com/docs/js/initializing
in payment.page.ts, where
// const stripe = Stripe(stripeKey);
this.elements = stripe.elements({ clientSecret, cardStyle });
if you just follow the example and hardcode the clientSecret i.e.
this.elements = stripe.elements({
clientSecret: 'pi...secret...',
});
do you still get an error?
See
and you know what, I was receiving all the payments successfully till 24th of May, I have seen those in my stripe dashboard, it has stopped since yesterday. and I really dont know why
I was using the same code
lets try keeping things simple first. Don't pass the appearance i.e. cardstyle
oh hmm, sorry, i missed the bit where it says clientSecret does not exist in type ElementsCreateOptions
yes
and if I comment this -> const stripe = Stripe(stripeKey);
then that error would gone
you shouldn't comment out that line. The problem is probably with the typescript declarations
I have made element type any
gimme a second
should I downgrade the stripe package version?
Sure please
Hey, taking over from @proven falcon here โ just catching up!
Sure, take your time
Where are you actually initializing Stripe.js? All I can see is the line that's currently commented out
this.elements = stripe.elements({ clientSecret, cardStyle });
But stripe isn't defined anywhere?
if I initialise stripe then I am facing two errors
check this
Can you share your package.json? Specifically which version of @stripe/stripe-js you're using
"@stripe/stripe-js": "^1.20.3",
in the index.html file, I am loading that script (stripe.js/v3) one
Do you have conflicting types? 1.20.3 should have the required types for the Element instance: https://github.com/stripe/stripe-js/blob/v1.20.3/types/stripe-js/elements.d.ts#L440
Are you including the Stripe.js script manually as well as using the @stripe/stripe-js package?
I am including the stripe.js script in the header tag
Firstly, you need to uncomment the stripe initialization
The type errors aren't breaking, but we can resolve them separately
Yep, you'll still have the type errors. But you can // @ts-ignore them for now. We should first focus on fixing your payment form
That should fix the stripe is not defined error which is preventing the Element from loading
Ok, great. Progress ๐
What is the value of const clientSecret = this.stripeService.clientSecret;?
Is that a client_secret from a Payment Intent? https://stripe.com/docs/api/payment_intents/object#payment_intent_object-client_secret
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Excellent! Do you still have the type errors in your editor?
Man!!! thank you so much, I dont know how to express, but its been 30+ hours I have spent on this error.
Its gone as I am using //ts-ignore
Thank you once again @unkempt whale @proven falcon
Np! We can work to fix those errors if you want, rather just ignoring them