#jalson1982-react-native

1 messages ยท Page 1 of 1 (latest)

tribal vine
#

@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?

carmine lintel
#

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 ๐Ÿ˜ฆ

tribal vine
#

Thanks, let me ask my team and I'll be back with some pointer

carmine lintel
#

ok thx a lot

tribal vine
carmine lintel
#

no it is not null

tribal vine
#

So you print it right before and it's not null? Do you have a PI id I can look at?

carmine lintel
#

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 ๐Ÿ˜ฆ

tribal vine
#

okay so I think we need more info/logs with the other link I gave you

carmine lintel
#

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"]

tribal vine
#

yeah there's no info in that

carmine lintel
#

and what i can log. only error i can log

tribal vine
#

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

carmine lintel
#

if I use CardField

#

component all works fine

#

what you mean normal PaymentIntent? Maybe I can ask backend devs to set me up?

tribal vine
#

is it the first time you're using PaymentSheet?

#

Sorry your original ask implied everything worked fine and suddenly stopped working

carmine lintel
#

yes i can even share video all was working fine and i paid multiple. now it does not starts at all

#

๐Ÿ˜ฆ

tribal vine
#

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

carmine lintel
#

yes it seems very similar

#

yer

tribal vine
#

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.

carmine lintel
#

so if PI is for Invoice it will not work with PaymentSheet?

#

we need invoice because of tax

tribal vine
#

Correct it won't work with PaymentSheet and you have to approach it differently

carmine lintel
#

do you maybe know how to sort it out that we do not use inovice with tax?!

tribal vine
#

You can't, you have to use Invoices to use Tax

carmine lintel
#

so basically we are in problem ๐Ÿ˜ฆ

tribal vine
#

Not really, you can do all of this without using PaymentSheet

carmine lintel
#

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 ๐Ÿ˜ฆ

tribal vine
#

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

carmine lintel
#

it is always open status ๐Ÿ˜ฆ and crazy how this worked

tribal vine
#

you're mixing things up

#

"open status" is unrelated, it's about the Invoice. I'm talking about the PaymentIntent

carmine lintel
#

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

tribal vine
#

Can you show me a concrete example where the Invoice's PI is in requires_confirmation and you can use PaymentSheet?

carmine lintel
#

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

tribal vine
#

Sorry can you do this again but not complete the payment. Just give me the id after you've confirmed the PaymentSheet works

carmine lintel
#

"pi_3KJjx9H51DFKcjD210bGcyi2_secret_mOdKLIkNZMAXdmO1azGWb5eal"

#

this one works

#

it seems if user has unpaid invoices

#

sheet will not be presented

#

can it be case?

tribal vine
#

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