#develoop
1 messages · Page 1 of 1 (latest)
in one button this :
const { error, paymentOption } = await initPaymentSheet({
merchantDisplayName: "Example, Inc.",
returnURL: "sdaad",
customFlow: true,
intentConfiguration: {
mode: {
amount: 6099,
currencyCode: 'USD',
},
confirmHandler: () => {}
}
});
console.log("fatto " + error);
if (!error) {
}
in the other the presentPaymentsheet call
it's exactly the one in your documentation
<StripeProvider
publishableKey="pk_test_51Lffj6Iypj0NBgO1gKLegA1cvy8h5xon00fjwyLKWFTpHpqBaxw3iNIQMRj4o6gbn86DljNQvbUWCRW4mCUF9D6I00vpMO95cf"
merchantIdentifier="merchant.it.dvloop.loopscuola"
stripeAccountId="acct_1Mjn82AomaUaBnvu" >
this is the stripeprovider configuration
And when you try to open the PaymentSheet you get the error message you shared earlier?
yes
Which version of stripe-react-native are you using?
0.29
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
Have you been following the documentation? Or did you make any changes?
IT'S EXACTLY THE DOCUMENTATION
I mean, in the rest of the code?
what rest of the code?
i'm devloping an app
i have a page for the payment and it's all there
i just followed the example
if it can help when i call the initpaymentshit doesn't reach the console log after that
so it doesn't initialize
but there is no fucking error
There's no need to get emotional. I am trying to understand what is the issue, same as you. I don't see your code, your app and your environment that's why I am asking questions.
ok
Could you please share the code of the whole component?
Have you tried adding a console log before the call to initPaymentSheet()?
i hit the consolelog at 171 but no the one at 184
and then, when i call the presentpaymentsheet i got the error
the same example with paymentIntent and/or setupIntent work correctly but i need to do the one with IntentConfiguration
I understand. And the error variable is null, correct?
Can you try wrapping the content of inizializzaStripe() in a try {} catch {} block? It can't just halt execution without throwing an exception.
This makes sense, you must initPaymentSheet() first.
nothing
i can't wrap the entire InizializzaStripe function cause you can't use it outside try catch
i wrapped the initpaymentsheet function but as you can see in the conse the only log is the one at 171
Okay, this is weird.
I haven't tried running the react-native example on my own yet, so I will need a bit more time to investigate.
Btw, what happens if you don't set customFlow?
So working ok?
with coustomFlow: false pass the initialization but doesn't open the paymentsheet
no cause it doesn't appear the paymentmethod selection
doesn't show the paymentmethod selection
the point is that i need to do it with customFlow: true
because i had to modify the amount of the transaction based on the choosen paymentmethod
now i had to go to lunch i will come back in 2 hours
I undestand.
Okay, I will have to close this thread after some time, but this issue seems strange, so I would like to take a closer look, which requires more time than we have on Discord.
I would recommend you to write to Slack Support, and say you chatted with us on Discord, then your case will be redirected to our team. This way we will have more time to deeply investigate.