#Vortixz

1 messages ยท Page 1 of 1 (latest)

trim socketBOT
glad blaze
#

hi!

azure lagoon
#

What is going wrong specifically?

glad blaze
#

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?

azure lagoon
#

Currently the payment sheet is not displaying the correct methods as selected in the Stripe dashboard.
What do you mean by this?

glad blaze
#

I have selected iDeal in the dashboard, but the payment sheet only displays creditcard

azure lagoon
#

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?

glad blaze
#

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

Securely accept payments online.

#

this is the most important code

#

I wrapped my rendered code in the StripeProvider with my publishable key

#

firebase checkout_session

slender hamlet
#

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

glad blaze
#

No problem! Thanks for your time. Apart from what I just sent, this is basically a button that triggers the presenPaymentSheet from useStripe()

slender hamlet
#

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?

glad blaze
#

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?

slender hamlet
#

Just want to rule out mixed up IDs as a possible cause of this

glad blaze
#

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

slender hamlet
#

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

glad blaze
#

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

slender hamlet
#

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.

glad blaze
#

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

glad blaze
slender hamlet
#

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

glad blaze
#

I dont have any other Firebase code, it's the extension

#

that does the backend work

slender hamlet
#

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?

glad blaze
#

yes, i have never tried 4242 before. do you have the MM / YY and CVC for me please?

#

otherwise ill google it

slender hamlet
#

MM/YY can be any month in the future and CVC can be any three digit CVC

glad blaze
#

thank you

slender hamlet
#

And the actual card number is 4242 four times

glad blaze
#

would you like client_secret?

#

there is also a payment id

slender hamlet
#

I see the confirm request in your logs. Can look through there, thank you

glad blaze
#

hmm the client_secret is the same as the code i sent before

#

right?

slender hamlet
#

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?

glad blaze
#

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?

strong ginkgo
#

๐Ÿ‘‹ stepping in

#

Give me a sec to catch up

#

What version of React Native are you using?

glad blaze
#

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

strong ginkgo
#

Sorry, for the Stripe RN SDK specifically

glad blaze
#

Hello! ill check

strong ginkgo
#

Hmm your code started crashing from uncommenting the ephemeral key?

glad blaze
#

"@stripe/stripe-react-native": "0.19.0",

#

this one?

strong ginkgo
#

Yep thanks

glad blaze
#

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

strong ginkgo
#

All good. Can you kill your app completely and rebuild it?

#

I assume you are on an emulator?

glad blaze
#

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

strong ginkgo
#

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

glad blaze
#

paymentIntentClientSecret?

#

pi_3MEKQVBikdVlWBRq1QhoBC7K_secret_UlEdqlXiMB8YjneZEnwuZIjU6

strong ginkgo
#

That works

glad blaze
#

so i get this ID from the firebase document that gets created on the first render (the initializePaymentSheet() in my useEffect)

strong ginkgo
#

Do you have a return_url set on initPaymentSheet?

glad blaze
#

i have not

strong ginkgo
#

Ah okay I'm pretty sure that is going to be required for bank redirects

#

Checking

#

Yeah mine crashes without it

glad blaze
#

ah! so that must be where the problem is

strong ginkgo
#

Let's start there ๐Ÿ™‚

glad blaze
#

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

strong ginkgo
#

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

glad blaze
#

oh right, thats great

#

YES it works!!

strong ginkgo
#

๐ŸŽ‰

glad blaze
#

you're the best

strong ginkgo
#

I'll get the docs clarified

#

We should call that out more clearly

glad blaze
#

now the properties defaultBillingAdress etc finally makes sense haha!

strong ginkgo
#

๐Ÿ™‚

glad blaze
#

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

strong ginkgo
#

Yeah I understand; it is definitely a lot to sift through

glad blaze
#

one more thing though i'm sorry

strong ginkgo
#

Sure

glad blaze
#

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?

strong ginkgo
#

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

glad blaze
#

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

strong ginkgo
#

Happy to help

glad blaze
#

is there any way i could reach out to you specifically in the future or is it always random employees?

strong ginkgo
#

My team staffs this channel 24/5

#

So myself or someone will be around to help if you have future questions

glad blaze
#

great, thank you and have a good night

strong ginkgo
#

You too!