Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GiacomoTui committed Jul 8, 2024
1 parent 8a03bf0 commit 38abb92
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ extension StripeSdk {
mode = PaymentSheet.IntentConfiguration.Mode.payment(
amount: amount,
currency: modeParams["currencyCode"] as? String ?? "",
setupFutureUsage: modeParams["setupFutureUsage"] != nil
? (modeParams["setupFutureUsage"] as? String == "OffSession" ? .offSession : .onSession)
: nil,
setupFutureUsage: { return switch modeParams["setupFutureUsage"] as? String {
case "OffSession": .offSession
case "OnSession": .onSession
default: nil
} }(),
captureMethod: captureMethod
)
} else {
Expand Down

0 comments on commit 38abb92

Please sign in to comment.