#jalson1982-react-native
1 messages ยท Page 1 of 1 (latest)
@carmine lintel what changed on your end? did you upgrde the SDK maybe?
Can you share a bit more details such as the exact version of the SDK you're using and the code surrounding the error?
ok gimme sec
"@stripe/stripe-react-native": "^0.2.2",
first in component i do this
useEffect(() => {
initStripe({
publishableKey: stripeKey,
});
}, []);
(async () => {
const {error: isErr} = await initPaymentSheet({
paymentIntentClientSecret: data?.clientSecret,
});
if (isErr) {
return setPaymentFailed(true);
}
if (!isErr) {
const {error: isSheetErr} = await presentPaymentSheet();
if (!isSheetErr) {
setHasBadge(true);
return setPaymentSuccess(true);
}
setPaymentFailed(true);
}
})();
isSheetErr: is always this: {"code": "Failed", "declineCode": null, "localizedMessage": null, "message": null, "stripeErrorCode": null, "type": null}
start to open sheet and close it with error
initpaymentsheet do not throw error. presentPaymentSheet somehow does not work ๐ฆ
Thanks, let me ask my team and I'll be back with some pointer
ok thx a lot
Do you have logs from the device? You can read https://reactnative.dev/docs/debugging#accessing-console-logs for help
Iโd also suggest double-checking that paymentIntentClientSecret is not null , and printing the value to confirm since that can also cause the issue
no it is not null
So you print it right before and it's not null? Do you have a PI id I can look at?
yeah i will send you all now
pi_3KJirWH51DFKcjD20jB6uRLP_secret_ZltxirImOgXggtzfQEVj4Lab5
and initPaymentSheet do not throw error
const {error: isSheetErr} = await presentPaymentSheet()
this one do ๐ฆ
okay so I think we need more info/logs with the other link I gave you
i see this in xcode
ANALYTICS: ["app_version": "1.3", "apple_pay_enabled": 1, "app_name": "Kliently (development)", "product_usage": ["PaymentSheet"], "ocr_type": "none", "is_development": true, "os_version": "15.2", "analytics_ua": "analytics.stripeios-1.0", "additional_info": [], "event": "mc_complete_init_default", "publishable_key": "pk_test_51Ji3FzH51DFKcjD2OQDkEz1fqAn7TSewlp4DdpHyn8OcHFVlOa6nrA3VQCCP8KFfKF8MNaXK4eGKgwjDgrsO07jr00ZhLfU7tp", "bindings_version": "21.8.1", "device_type": "x86_64", "ui_usage_level": "partial"]
yeah there's no info in that
and what i can log. only error i can log
This PaymentIntent is from an Invoice. Is this the first time you do this? Does it work with a "normal" PaymentIntent?
I'm not saing you have to log anything, I'm saying there might be some internal logs you can access
if I use CardField
component all works fine
what you mean normal PaymentIntent? Maybe I can ask backend devs to set me up?
is it the first time you're using PaymentSheet?
Sorry your original ask implied everything worked fine and suddenly stopped working
yes i can even share video all was working fine and i paid multiple. now it does not starts at all
๐ฆ
And the PaymentIntent is associated to an invoice. There are PaymentIntents without an Invoice, like for normal standalone payments. So I'm asking if this is the first time you're trying with the PaymentIntent of an invoice and whether the failure is related
https://github.com/stripe/stripe-react-native/issues/323#issuecomment-947892989 it seems similar to this comment/issue where PaymentSheet doesn't work well with Invoicing/Subscriptions for now
So my guess is that before you used "normal payment intents". That one isn't normal, it's tied to an Invoice. Maybe it's new on your account that you do that, maybe it's just bad luck with that one. You should talk to your back end dev to understand the difference here
Overall, you will have to detect when the PI is for an Invoice and in that case you can't use PaymentSheet for now
So my guess is that before you used "normal payment intents". That one isn't normal, it's tied to an Invoice. Maybe it's new on your account that you do that, maybe it's just bad luck with that one. You should talk to your back end dev to understand the difference here
Overall, you will have to detect when the PI is for an Invoice and in that case you can't use PaymentSheet for now. You'd skip it entirely and call confirmPayment() to use the already attached PaymentMethod.
so if PI is for Invoice it will not work with PaymentSheet?
we need invoice because of tax
Correct it won't work with PaymentSheet and you have to approach it differently
do you maybe know how to sort it out that we do not use inovice with tax?!
You can't, you have to use Invoices to use Tax
so basically we are in problem ๐ฆ
Not really, you can do all of this without using PaymentSheet
so CardField only option for now?!
pi_3KGSwIH51DFKcjD20O9KjV3K
can you check this payment intent is this invoice?
as this one worked for me i can provide video even
as this can help us to know what was different . sorry if I bother you too much
i am stuck with crazy project manager that wants sheet ๐ฆ
yeah that one is for an invoice, but it must have been in a different status. You have to understand the back end part of it and how the PaymentIntent ends up and in which status
it is always open status ๐ฆ and crazy how this worked
you're mixing things up
"open status" is unrelated, it's about the Invoice. I'm talking about the PaymentIntent
requires_confirmation
we have this on every generated invoice. is there any chance we can do something here about it? as it is weird again i am boring idiot but it worked somehow and can not get it how
Can you show me a concrete example where the Invoice's PI is in requires_confirmation and you can use PaymentSheet?
just get it to work with new created user
pi_3KJjp4H51DFKcjD20zU9qwBX_secret_j39IhrS7X2307vo6xR0tT4dCS
sheet payment works. what is difference in this one ๐ฆ
just log out with old client and create new acc and all works
Sorry can you do this again but not complete the payment. Just give me the id after you've confirmed the PaymentSheet works
"pi_3KJjx9H51DFKcjD210bGcyi2_secret_mOdKLIkNZMAXdmO1azGWb5eal"
this one works
it seems if user has unpaid invoices
sheet will not be presented
can it be case?
what do you call "user has unpaid invoice"
This payment intent is in requires_payment_method. So it's in the exact same state as a normal PI
the problem is when your PI is in requires_confirmation
which means it already has a PaymentMethod attached, and so PaymentSheet doesn't handle this well