Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] STPPaymentIntentCaptureMethod missing enum case #4329

Open
sschizas opened this issue Dec 4, 2024 · 3 comments
Open

[BUG] STPPaymentIntentCaptureMethod missing enum case #4329

sschizas opened this issue Dec 4, 2024 · 3 comments
Labels
fixed in master Fixed in master, awaiting next update kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@sschizas
Copy link

sschizas commented Dec 4, 2024

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

@sschizas sschizas changed the title [BUG] [BUG] STPPaymentIntentCaptureMethod missing enum case Dec 5, 2024
@tjclawson-stripe
Copy link

Hi @sschizas, thanks for reporting. We've created a ticket to fix this.

@tjclawson-stripe tjclawson-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Dec 6, 2024
@sschizas
Copy link
Author

@tjclawson-stripe is there an ETA for this one?

@yuki-stripe
Copy link
Collaborator

@sschizas Thanks again for reporting this, will be fixed in the next release after the holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in master Fixed in master, awaiting next update kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

3 participants