#josha_ios-migration

1 messages ¡ Page 1 of 1 (latest)

rough tulipBOT
#

👋 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/1290361971547574375

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

dawn basin
#

Based on this code from the latest stripe-ios-sdk release commit (23.31.0):
https://github.com/stripe/stripe-ios/blob/cb4b3252bab308ea034579b7fad0b986dc73a9c1/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/CustomerSheet/CustomerSavedPaymentMethodsViewController.swift#L214-L216

It appears that, in the new, PaymentSheet-based way of collecting payment information, it is not possible to directly present a 'Save a new payment method' form, if the user already has existing payment methods added.

In the legacy SDK, this functionailty was possible.

I just want to confirm if that is, indeed, true? And, if so, if there's any way with the PaymentSheet SDK to directly present the 'Save a new payment method' form and, if so, how?

sweet vault
#

josha_ios-migration

#

@dawn basin You can use PaymentSheet to add a new card or any payment method. What's blocking you exactly?

dawn basin
#

So, when I use the code included above, the latest Stripe SDK presents this screen.

Notice it is a carousel of existing payment methods with an '+ Add' option.

#

The '+ Add' option takes you to this screen.

#

In the legacy SDK, we were able to present the latter directly, without an intermediate screen.

#

My question is if the modern PaymentSheet SDK allows this? And, if so, how?

#

Our UI flow is not amenable to the intermediate payment method carousel. We'd like to directly present the 'Save a new payment method' screen.

#

In abstract terms, it seems like, when we call into the Stripe SDK, we'd want to immediately present a CustomerAddPaymentMethodViewController

sweet vault
#

ack, sorry I barely understand what you describe and you're deep in it and talking about really old integration paths. Looking but give me some time

dawn basin
#

Sure. Yes, sorry this is a highly-contextual issue. Let me know if there's any clarification I can help with.

dawn basin
#

Do you think you could help me figure out how that might work?

dawn basin
#

Hmm ok, I'll take a look at this.

#

I did my own searching through stripe-ios source and I have a hunch from reviewing the code that this might plainly not be possible (e.g. the appropriate APIs aren't exposed publicly). Do you think there's some way to confirm this suspicion?

sweet vault
#

The best way would be to try the version I linked you to first and see if that fits your needs

dawn basin
#

It'd be great to save some time playing with FlowController just to discover it won't work.

sweet vault
#

I'm sorry but I'm not an expert at iOS and I don't know the old integrations. The descriptions look to be what you want at least so that's what I'd recommend trying. Otherwise, reply to the email you received to get asynchronous help from our support team

dawn basin
#

Ah ok, thanks for the context. Is there any way to have an engineer familiar with this corner of the Stripe codebase to drop in here, maybe?

Git blame on this file suggests John Woo (wooj), davidme, and Yuki mostly contributed to this component.

sweet vault
#

That's not really possible no, sorry. The fastest approach would be to try that integration and see how it fits your needs. But you can also reply to that email you received to get asynchronous help from our support team.

dawn basin
#

Ok, thanks for the help so far.