#tom - agora liverstock
1 messages ยท Page 1 of 1 (latest)
https://stripe.com/docs/disputes/prevention/advanced-fraud-detection#stripejs you can set it directly on load I guess?
Thanks @solid latch . I then get the following error. seen this before?
Hmm that looks like a completely different error?
I think it's because the await is in the top level and not within an async function.
Not sure what that means ๐ค
Oh ok, no problem. Do you have any javascript knowledge?
Not super familiar unfortunately :/
No worries at all. Is there someone in the dev support channel who does have some experience with Javascript modules, Next.js, React?
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>
?
I'm importing the script via es modules so I can't set the query string directly.
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');
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
What happen if you comment out
loadStripe.setLoadParameters({advancedFraudSignals: false});
error gone?
Error gone but Stripe gets called on every page call or refresh, which is what I want to disable.
Is create-org-form.tsx the current file?
It is! Nice! can you see it in your logs?
No I am just guessing based on your screenshot
Quick gg and how about this?
probably you called loadStripe somewhere earlier? ๐ค
I really doubt somewhere else also had a call to loadStripe
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
That's weird ๐ค And commenting out the setLoadParameters did resolve the error, correct?
It did resolve the error however it meant I couldn't set the advanceFraudSingals to false which is what I'm trying to do.
I updated my package version and it is now working. Thanks for your help today @solid latch ๐