#Vortixz
1 messages ยท Page 1 of 1 (latest)
hi!
What is going wrong specifically?
I'm using the extension from firebase to use the Payment Sheet. Currently the payment sheet is not displaying the correct methods as selected in the Stripe dashboard. When I try to alter the object that I'm sending to Firestore I don't see any changes. Also when I try to change the price, it's inconsistly updating the PaymentSheet
And now it also crashes, perhaps because I'm altering the object that I'm sending to firestore like so?
Currently the payment sheet is not displaying the correct methods as selected in the Stripe dashboard.
What do you mean by this?
I have selected iDeal in the dashboard, but the payment sheet only displays creditcard
You listed 3 different problems that seem entirely unrelated. Can you list each step explicitly along with API calls such that we might be able to reproduce the error?
okay i'll start with the payment method then.
Are you familliar with the firebase extension?
I have it set up according to the documentation and created a webhook with a bunch of events. Besides that documentation I could implement most of the client side code from here: https://stripe.com/docs/payments/accept-a-payment
Now the payment sheet opens up but it only shows payment with creditcard. But i have selected iDeal to be accepted
this is the most important code
I wrapped my rendered code in the StripeProvider with my publishable key
firebase checkout_session
Hey apologies for the delay, we are still looking in to this. Can you share your client side code for actually presenting the payment sheet here? As far as I can see, that should definitely display iDeal as an option. Strange that t is only showing card
No problem! Thanks for your time. Apart from what I just sent, this is basically a button that triggers the presenPaymentSheet from useStripe()
Quick question: Have you debugged client side to make sure the payment intent client secret getting passed in to the payment sheet is the same one that your server is sending here?
I do remember a payment method called Link or something showing up as well, but now it isn't after turning it off in the dashboard. So maybe it is kind of working?
Just want to rule out mixed up IDs as a possible cause of this
Let me check quickly
if i save my code, which causes a rerender. I see a new document being created as expected. But in my initializePaymentSheet method when i console.log the intentclientsecret I get a different ID
But i reckon that when i log out, login and then check it would be correct. So i'll try that as well
Can you send me the other client secret that showed up?
If it is still around. I get that you may have just continued execution
Happy to take another one, just want to look at exactly what the sheet is looking at when it is being initialized
so even after logging out and in, my console log remains: pi_3MEJ6aBikdVlWBRq0r4yh2Hu_secret_WdEc8DovM8xZYK0pnPhnNG3fN
and in the new document that's being created its: pi_3MEJikBikdVlWBRq1HUbkg7X_secret_uVn6EU32TP48OnUsR28D4fZkz
I may not be familiar enough with Firebase or RN here. What console is this?
I do see that both of those payment intents include ideal the first one actually has a couple accepted payment method types other than iDeal.
its just a console.log, javascripts way of printing
yes that's good, then it's listening to the dashboard i'd say, theres a lot of default methods set up there
but if you look here in the most upper method, i have payment_method_types which should disable every method selected in the dashboard and only listens this this array
so that's not good
Oh I meant client side. In your RN code can you check the client secret just before the PaymentSheet is initialized?
Yeah, it looks like the second secret is the one from the top method. May want to double check your other Firebase code to see if it creates another PaymentIntent somewhere else
Gotcha, thinking of how else to look at this. As one more quick test while I am thinking, can you try actually making a test payment on that payment sheet with our 4242 test card number?
yes, i have never tried 4242 before. do you have the MM / YY and CVC for me please?
otherwise ill google it
MM/YY can be any month in the future and CVC can be any three digit CVC
thank you
And the actual card number is 4242 four times
I see the confirm request in your logs. Can look through there, thank you
Yeah, looks like it is using that first payment intent that has options for multiple payment method types. Which is also surprising because that implies it should show all five of them.
"card",
"bancontact",
"eps",
"giropay",
"ideal"
],```
It also shouldn't affect it, but can you uncomment the ephemeral key line that is commented out?
i commented that out because i got an error that i was expired and I don't know how to renew it. But now i'm uncommenting it and I get "The operation couldn't be completed. Stripe.PaymentSheetError error 0
not sure if this error is related to the above, because there's a lot of crashes/things not working going on haha
I also feel like code changes either take really long to take effect or that I need to perform a certain action to see the changes. for example if i were to change the "amount" property, it would not show immediately, i don't know if this is time related or maybe it needs another secret key?
๐ stepping in
Give me a sec to catch up
What version of React Native are you using?
even after making a new account its not working properly. triggering the sheet causes an error that the sheet isnt initialized, when i force rerender by saving my code, the sheet opens and crashes the app. So i feel like if we were to fix all these problems it would take extremely long. Maybe it's best to ditch the firebase extension and create a node server or something
Sorry, for the Stripe RN SDK specifically
Hello! ill check
Hmm your code started crashing from uncommenting the ephemeral key?
Yep thanks
could be so many things causing the crash, really hard to tell. it hasnt been quite stable today. but yes after uncommenting
but if i would recomment it, nothing really changes so it might need some other action to properly load
excuse the lack of programming terms
All good. Can you kill your app completely and rebuild it?
I assume you are on an emulator?
im using expo so i'm in the expo go app as well as a ios emulator
ill stop the server and rerun it
on my physical phone it now crashes the expo go app, and the emulator throws the previous error again
Hmm can you give me the PaymentIntent ID for that test (or one that triggers that error)?
Also booting up my own sample
In the meantime
paymentIntentClientSecret?
pi_3MEKQVBikdVlWBRq1QhoBC7K_secret_UlEdqlXiMB8YjneZEnwuZIjU6
That works
so i get this ID from the firebase document that gets created on the first render (the initializePaymentSheet() in my useEffect)
Do you have a return_url set on initPaymentSheet?
i have not
Ah okay I'm pretty sure that is going to be required for bank redirects
Checking
Yeah mine crashes without it
ah! so that must be where the problem is
Let's start there ๐
okay so that's gonna take a while for me to figure out how to set it up. Would you mind checking my code and see if this is future and production proof? im kind of unsure because for example when I finish a test payment, i get the sheet is not initialized error. and i would like to not get those errors
You shouldn't need to set it up to test
Just use returnURL: 'https://www.example.com',
You can set up the deep link later
๐
you're the best
I'll get the docs clarified
We should call that out more clearly
Doesn't look like we call it out explicitly on https://stripe.com/docs/payments/accept-a-payment?platform=react-native
now the properties defaultBillingAdress etc finally makes sense haha!
๐
yeah honestly the docs can be quite confusing also when there are so many ways to handle the backend
because i could do cloud functions in firebase, or use the extension or maybe a node backend. so i needed to combine many youtube videos, many guides into 1 piece of code which is what i now have
but i'm extremely glad this works now
Yeah I understand; it is definitely a lot to sift through
one more thing though i'm sorry
Sure
now the payments are hardcoded, for example the amount i set in the addDoc
how would i use my product i made in the dashboard?
You don't use Products/Prices with PaymentIntents
You would only use Products/Prices if you are using Stripe Checkout (web hosted payment page) or if you are using Subscriptions/Invoices
So instead you want to just track your Products yourself, and you can add them to metadata on the PaymentIntent to help with reconciliation (I assume firebase extension let's you set metadata?)
i'm not sure but that should be possible, other wise i'll create another "orders" collection with the product data. ill just dynamically set the "amount" property after looping through the product myself.
okay so that would be enough for me to figure out myself
thank you so much
Happy to help
is there any way i could reach out to you specifically in the future or is it always random employees?
My team staffs this channel 24/5
So myself or someone will be around to help if you have future questions
great, thank you and have a good night
You too!