#drackmord_code

1 messages ยท Page 1 of 1 (latest)

cerulean radishBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1299303801852788787

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

edgy mulch
#

๐Ÿ‘‹ happy to help

short tiger
#

Hi, thanks! Do you mean that I could

  • Let the customer pick a payment method in our custom UI (i.e.: Bancontact)
  • User taps the PAY button
  • Under the hood, I initialise the payment sheet with a Bancontact payment method, and immediately call .confirm(), without the sheet ever being displayed to the user?
edgy mulch
#

yes that's also possible

cerulean radishBOT
short tiger
#

Thanks! Do you mean that I can use PaymentSheet the way I described, or that to achieve that I should use this last link you provided?

young moss
#

Hey! Taking over for my colleague.

#

Under the hood, I initialise the payment sheet with a Bancontact payment method, and immediately call .confirm(), without the sheet ever being displayed to the user?
Why you want to use PaymentSheet in this scenario ? you can simply confirm the payment suing the confirm PaymentIntent API from your backend

#

PaymentSheet is used for collecting/managing PaymentMethods.

short tiger
#

Hi! Well my main reasoning is that I was only aware of the "original" confirmPayment() api in the Stripe class, which required the use of the deprecated onActivityResult(), but I see in the last link shared that PaymentLauncher serves the purpose of doing that with modern callbacks, which is awesome.

I was just asking about PaymentSheet in "headless mode" because I assumed some of the boilerplate code was handled by it and would allow me to use one implementation (create the payment sheet, display it to collect card details, or programmatically set a different payment method, then run .confirm()) but I see that it's not really designed for that, so for other payment methods I guess I'll use PaymentLauncher, instead.

Thank you both!