-
Notifications
You must be signed in to change notification settings - Fork 1k
Use Link branding for PTM payment methods in SPM #5130
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
Conversation
@@ -59,6 +59,8 @@ struct ElementsCustomer: Equatable, Hashable { | |||
let paymentMethod = paymentMethodWithLinkDetails.paymentMethod | |||
if let linkDetails = paymentMethodWithLinkDetails.linkDetails { | |||
paymentMethod.setLinkPaymentDetails(from: linkDetails) | |||
} else { | |||
paymentMethod.isLinkPassthroughMode = paymentMethodWithLinkDetails.isLinkOrigin |
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.
A payment method is only created in Link passthrough if isLinkOrigin
is true but linkDetails
is nil.
@@ -779,7 +779,7 @@ extension PaymentOption { | |||
let hasLinkAccount = LinkAccountContext.shared.account?.isRegistered ?? false | |||
switch self { | |||
case .saved(let paymentMethod, _): | |||
return paymentMethod.isLinkPaymentMethod && hasLinkAccount | |||
return (paymentMethod.isLinkPaymentMethod || paymentMethod.isLinkPassthroughMode) && hasLinkAccount |
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.
Treat passthrough and payment method mode the same when it comes to the return-user experience.
Summary
This pull request extends the Link branding beyond payment methods of type
link
to payment methods that were created in passthrough mode.Motivation
Testing
Changelog