From eaa2244d875353cdc5668a17df87bb564ad72202 Mon Sep 17 00:00:00 2001 From: John Woo <99628984+wooj-stripe@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:23:03 -0800 Subject: [PATCH] Updating cvc recollection interface (#3092) --- .../PaymentSheet/PaymentSheetIntentConfiguration.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheetIntentConfiguration.swift b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheetIntentConfiguration.swift index 57b0c2bc20f..77eec5fc9ae 100644 --- a/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheetIntentConfiguration.swift +++ b/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/PaymentSheetIntentConfiguration.swift @@ -34,7 +34,7 @@ public extension PaymentSheet { _ intentCreationCallback: @escaping ((Result) -> Void) ) -> Void - public typealias CVCRecollectionHandler = () -> Bool + public typealias CVCRecollectionEnabledCallback = () -> Bool /// Creates a `PaymentSheet.IntentConfiguration` with the given values /// - Parameters: @@ -58,7 +58,7 @@ public extension PaymentSheet { paymentMethodTypes: [String]? = nil, onBehalfOf: String? = nil, confirmHandler: @escaping ConfirmHandler, - isCVCRecollectionEnabledCallback: CVCRecollectionHandler? = nil) { + isCVCRecollectionEnabledCallback: CVCRecollectionEnabledCallback? = nil) { self.mode = mode self.paymentMethodTypes = paymentMethodTypes self.onBehalfOf = onBehalfOf @@ -84,11 +84,9 @@ public extension PaymentSheet { /// In the case of client-side confirmation, the CVC/CVV value will be /// sent with the confirmation of the payment intent within payment_method_options. /// - /// (Future) In the case of server-side confirmation, the CVC/CVV value - /// will be contained in a ConfirmationToken and exposed via - /// a ConfirmationTokenID + /// Note: Only supported for PaymentSheet.FlowController integrations that use client-side confirmation @_spi(EarlyAccessCVCRecollectionFeature) - public var isCVCRecollectionEnabledCallback: CVCRecollectionHandler + public var isCVCRecollectionEnabledCallback: CVCRecollectionEnabledCallback /// Controls when the funds will be captured. /// - Seealso: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method