Skip to content

Commit

Permalink
fix flutter-stripe#900 PaymentMethodDataCardFromMethod on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
asaarnak authored Sep 1, 2022
1 parent c0718d4 commit 4ac64c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/stripe_ios/ios/Classes/Stripe Sdk/StripeSdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ class StripeSdk: RCTEventEmitter, STPApplePayContextDelegate, STPBankSelectionVi
return STPSetupIntentConfirmParams(clientSecret: setupIntentClientSecret, paymentMethodType: .USBankAccount)
} else {
let parameters = STPSetupIntentConfirmParams(clientSecret: setupIntentClientSecret)
if let paymentMethodId = paymentMethodData?["paymentMethodId"] as? String {
parameters.paymentMethodID = paymentMethodId
return parameters
}
let factory = PaymentMethodFactory.init(paymentMethodData: paymentMethodData, options: options, cardFieldView: cardFieldView, cardFormView: cardFormView)
do {
let paymentMethodParams = try factory.createParams(paymentMethodType: paymentMethodType)
Expand Down

0 comments on commit 4ac64c0

Please sign in to comment.