Skip to content

Commit

Permalink
MBL-1390: Enable Stripe Link (#2076)
Browse files Browse the repository at this point in the history
  • Loading branch information
amy-at-kickstarter authored Jun 10, 2024
1 parent ea4fb98 commit aecf743
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/stripe/stripe-ios",
"state" : {
"revision" : "e7bd9f65d40c20c1c84e6f335f60ff89f9f04a5d",
"version" : "23.10.0"
"revision" : "8a35266fab2e0ba116dec7d651ae69a0ca7bc7b7",
"version" : "23.27.2"
}
},
{
Expand Down
6 changes: 3 additions & 3 deletions Library/TestHelpers/Stripe+PaymentMethod.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

static let samplePaymentOptionsDisplayData: (PaymentSheet.PaymentOption)
-> PaymentSheetPaymentOptionsDisplayData = { paymentOption in
switch paymentOption {
case let .saved(paymentMethod):
case let .saved(paymentMethod, _):
return PaymentSheetPaymentOptionsDisplayData(image: .add, label: "••••1234")
case .applePay, .new, .link:
case .applePay, .new, .link, .external:
return PaymentSheetPaymentOptionsDisplayData(image: .add, label: "Unknown")
}
}
Expand Down
3 changes: 3 additions & 0 deletions Library/ViewModels/PledgePaymentMethodsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ public final class PledgePaymentMethodsViewModel: PledgePaymentMethodsViewModelT
configuration.merchantDisplayName = Strings.general_accessibility_kickstarter()
configuration.allowsDelayedPaymentMethods = true

// Enable Stripe Link
configuration.defaultBillingDetails.email = AppEnvironment.current.currentUserEmail

let data = PaymentSheetSetupData(
clientSecret: clientSecret,
configuration: configuration
Expand Down

0 comments on commit aecf743

Please sign in to comment.