#alexzada-paymentsheet
1 messages · Page 1 of 1 (latest)
you don't seem to be passing the secret
you just have paymentIntentClientSecret, on line 160
shouldn't it be paymentIntentClientSecret: "pi_xxx_secret_yyy", for instance?
yes I know it probably should work because of JS features, but just try explicitly assigning and see what happens
It worked, but my secret comes from paymentIntentClientSecret, how do I pass its value to initPaymentSheet
initPaymentSheet({ .... , paymentIntentClientSecret: paymentIntentClientSecret, .... }), I would think
didn't work, not even renaming paymentIntentClientSecret to some other name
can you share the exact code and the exact version of stripe-react-native you're using?
code as in, the text of the full activity, not a screenshot
I think I figured out the problem, paymentIntenteClientSecret was set to optional, when I set it to mandatory it works
const { error } = await initPaymentSheet({
//customerId: customer,
googlePay:true,
merchantDisplayName:"Test merchant",
merchantCountryCode:"IE",
customerEphemeralKeySecret: ephemeralKey,
paymentIntentClientSecret: paymentIntent,
// Set `allowsDelayedPaymentMethods` to true if your business can handle payment
//methods that complete payment after a delay, like SEPA Debit and Sofort.
allowsDelayedPaymentMethods: true,
returnURL:"my-rn-app://paymentcomplete"
});
works for me but I do pass more fields than you do. My guess is that something is required
weird, can't understand how that would matter since it's your code and not our SDK but if it fixed it, great!
maybe the paymentIntentClientSecret of the initPaymentSheet is mandatory, and as I was passing a property that can be undefined, it was not accepting it, I believe this is it
that would make sense
I don't use Typescript much personally as it gets in the way like that :p
I still get beat up a lot for typescript, this is my first project using it
@pure kindle I've already seen in the documentation a part that talked about how to use PaymentSheet only to collect card information, but I can't find it now, do you know where this part of the documentation is?
Hey there, I've stepped in your @pure kindle who had to step away
Yes, you can use the payment sheet to collect payment details without a payment, as seen here:
thanks 🙏
am i doing something wrong?
so is it to work without passing this parameter?
That's what I see -- where do you see the docs you show?
Hmm while there look to be some missing translations in PT, the snippets I see do look the same (no parameter)
So I'd suggest removing that param to match, though I am not sure why you see incorrect snippets. Can you try clearing your cache on the docs page view?
I opened it in an incognito tab, with the translation in English and this parameter still appears, but anyway, it seems to be working without
oh, really? Let me try that too
before I continue integrating, I need to ask a question, I was using CardField to get the card details and using the synchronous implementation with completion on the server, is it possible to do this with PaymentSheet?
No, that is not currently possible. Payment Sheet currently only supports client confirmation. We're working on adapting it to support other flows, though.
understand, ok then, thank you very much!
NP!