#tom - agora liverstock

1 messages ยท Page 1 of 1 (latest)

vale lodgeBOT
solid latch
maiden loom
#

Thanks @solid latch . I then get the following error. seen this before?

solid latch
#

Hmm that looks like a completely different error?

maiden loom
#

I think it's because the await is in the top level and not within an async function.

solid latch
#

Not sure what that means ๐Ÿค”

maiden loom
#

Oh ok, no problem. Do you have any javascript knowledge?

solid latch
#

Not super familiar unfortunately :/

maiden loom
#

No worries at all. Is there someone in the dev support channel who does have some experience with Javascript modules, Next.js, React?

solid latch
#

I will try to get one from my team! Btw did you get above error after just modifying to

<script src="https://js.stripe.com/v3/?advancedFraudSignals=false"></script>

?

maiden loom
#

I'm importing the script via es modules so I can't set the query string directly.

solid latch
#

oh you use React so it should be

import {loadStripe} from '@stripe/stripe-js/pure';

loadStripe.setLoadParameters({advancedFraudSignals: false});
const stripePromise = await loadStripe('pk_test_xxx');
maiden loom
#

I'm using import {loadStripe} from '@stripe/stripe-js/pure';

loadStripe.setLoadParameters({advancedFraudSignals: false});
const stripePromise = await loadStripe('pk_test_L1f0e3XAzjsG7jtp4uN7L9ql'
);

#

Yep, and that's when I get the error I first reported

solid latch
#

What happen if you comment out

loadStripe.setLoadParameters({advancedFraudSignals: false});
#

error gone?

maiden loom
#

Error gone but Stripe gets called on every page call or refresh, which is what I want to disable.

solid latch
#

Is create-org-form.tsx the current file?

maiden loom
#

It is! Nice! can you see it in your logs?

solid latch
#

No I am just guessing based on your screenshot

#

Quick gg and how about this?

maiden loom
#

hahaha of course! haha

#

I'll give it a go ๐Ÿ™‚

#

Then I get this again -

solid latch
#

probably you called loadStripe somewhere earlier? ๐Ÿค”

maiden loom
#

Nup, just followed the docs implementation

solid latch
#

I really doubt somewhere else also had a call to loadStripe

maiden loom
#

Maybe I need to update my version?

#

They are all the instances of loadStripe. One instance is commented out. The other two follow the instructions

solid latch
#

That's weird ๐Ÿค” And commenting out the setLoadParameters did resolve the error, correct?

maiden loom
#

It did resolve the error however it meant I couldn't set the advanceFraudSingals to false which is what I'm trying to do.

maiden loom
#

I updated my package version and it is now working. Thanks for your help today @solid latch ๐Ÿ™‚