#develoop

1 messages · Page 1 of 1 (latest)

normal dawnBOT
proper egret
#

Hi there!

#

Can you share the code that is throwing that error?

cunning citrus
#

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

proper egret
#

And when you try to open the PaymentSheet you get the error message you shared earlier?

cunning citrus
#

yes

proper egret
#

Which version of stripe-react-native are you using?

cunning citrus
#

0.29

mental mason
#

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?

cunning citrus
#

IT'S EXACTLY THE DOCUMENTATION

mental mason
#

I mean, in the rest of the code?

cunning citrus
#

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

mental mason
#

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.

cunning citrus
#

ok

mental mason
#

Have you tried adding a console log before the call to initPaymentSheet()?

cunning citrus
#

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

mental mason
#

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.

mental mason
cunning citrus
#

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

mental mason
#

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.

mental mason
normal dawnBOT
mental mason
#

So working ok?

cunning citrus
#

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

mental mason
#

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.