-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MBL-1390: Add Stripe Link #2048
Conversation
8048c8a
to
faa7992
Compare
@@ -22,15 +22,15 @@ extension STPPaymentMethod { | |||
]) | |||
|
|||
static let sampleStringPaymentOption: (STPPaymentMethod) -> PaymentSheet.PaymentOption = { paymentMethod in | |||
PaymentSheet.PaymentOption.saved(paymentMethod: paymentMethod) | |||
PaymentSheet.PaymentOption.saved(paymentMethod: paymentMethod, confirmParams: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change due to the Stripe SDK upgrade
@@ -157,6 +157,8 @@ public final class PaymentMethodSettingsViewModel: PaymentMethodsViewModelType, | |||
var configuration = PaymentSheet.Configuration() | |||
configuration.merchantDisplayName = Strings.general_accessibility_kickstarter() | |||
configuration.allowsDelayedPaymentMethods = true | |||
configuration.defaultBillingDetails.email = AppEnvironment.current.currentUserEmail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how Stripe looks up the user for Stripe Link
.retrieveSetupIntent( | ||
withClientSecret: clientSecret, | ||
expand: ["payment_method"] | ||
) { [weak self] intent, _ in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The callbacks for retrieveSetupIntent
and for retrievePaymentIntent
have different types, so they can't be shared.
faa7992
to
5d6f6ae
Compare
Converting to draft so I can add a feature flag |
5d6f6ae
to
9783d4e
Compare
...tarter-iOS/Features/PledgePaymentMethods/Controller/PledgePaymentMethodsViewController.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
📲 What
Implement Stripe Link for iOS.
🤔 Why
Stripe Link allows backers to store their card information with Stripe, and then auto-complete it when they use the Stripe payment sheet in Kickstarter. We're implementing this because it's a nicer user experience in checkout.
🛠 How
When Stripe Link returns, it gives us payment display information specific to Stripe Link - i.e. it was giving us a the Link icon and the label "Stripe Link".
To work around this, Stripe suggested we fetch the underlying payment method associated with the link, which allows us to grab the last four digits of the card and its card image. This makes Stripe Link function the way a manually added card does, and looks better in our UI.
👀 See
stripe-link-working.mp4
✅ Regression testing before merging