#Vortixz
1 messages · Page 1 of 1 (latest)
Sure what's up
Great!
I have figured out a possible error on my end which is very likely to have caused the inconsistent payment sheet
its this return method
are you by any change familiar with the way firestore is set up by the extension?
I'm not unfortunately
I know very little about firestore and the extension itself
But what do you think the issue is around that?
okay so what the extension does is create a document (which is a database record) and it has a subcollection (which would be a nested table in SQL terms) and that contains all the checkout_sessions
is a checkout_session a stripe term?
There is a Checkout Session object in Stripe, yes.
It is specifically used for Stripe Checkout
Which is like the web version of Payment Sheet
so all these documents in checkout_session gets created on initial render, but gets updated by the extension with the correct values like the intent client secret.
but what I did in my code i sent is I always get the first item of the array, if you look at the return value
do you see it?
For the id you mean?
i get an object back that has in id and the data
Ah yeah you are grabbing index 0 of the array that you are mapping
yeah exactly
K
so i basically always get the same checkout_session correct?
Yeah I'd assume so
If each session is appended to the table
Are you just trying to get the correct data to use with initPaymentSheet here?
Like I doubt you want to map through all of the data each time
yes
but this is indeed not the correct way
but this is going to be a firebase related issue then i think
When you hit the server it always responds with the full data set?
I feel like there must be a way to hit the server and it just responds based on what you just did
yea there must be, its the way im querying the database
so its a mistake of my own due to lack of documentation (not stripe's documentation) but in general
so im not going to waste your time with this matter
that's okay. ill get to work then 🙂
yes i am
its quite limited on documentation for react native
Yeah, if you do get completely stuck then feel free to post an issue on https://github.com/stripe/stripe-firebase-extensions/tree/next/firestore-stripe-payments
There are a couple people on my team who are experts on this but they aren't online right now. They will respond to an issue created on there though