[BUG] STPPaymentIntentCaptureMethod missing enum case #4329
Labels
fixed in master
Fixed in master, awaiting next update
kind:bug
triaged
Issue has been reviewed by Stripe and is being tracked internally
Summary
The STPPaymentIntentCaptureMethod doesn't support payment intents with
capture_method = automatic_async
.Code to reproduce
The
PaymentSheet.IntentConfiguration.CaptureMethod
supports manual, automatic, and automatic_async (the default value in the Payment Intent creation API). In contrast,STPPaymentIntentCaptureMethod
supports manual, automatic, and unknown—used when the SDK does not recognize the Payment Intent's capture method value.In the PaymentSheetDeferredValidator, a check ensures that the received Payment Intent's capture method matches the one configured in the PaymentSheet. Consequently, when a Payment Intent is created with the default
capture_method
value, the PaymentSheet fails to validate and confirm it.This behavior was verified by creating two Payment Intents using a cURL command: one with the automatic capture method and another with automatic_async. The former was successfully verified, while the latter failed, triggering the error: "Your PaymentIntent capture method (unknown) does not match the PaymentSheet.IntentConfiguration amount (automaticAsync)."
I used the ExampleCustomDeferredCheckoutViewController example as a guide to implement it in my project.
iOS version
Tested on iPhone 16 Simulator (iOS 18.1)
Installation method
Via Swift package manager
SDK version
24.1.1
Other information
The text was updated successfully, but these errors were encountered: