Summary
Hi, I'm the maintainer of @capacitor-community/stripe.
After upgrading to stripe-android v23.2.0, the onPaymentOption callback passed to PaymentSheet.FlowController.create() is invoked multiple times for a single user interaction.
Note: This does not occur in v23.1 and later versions.
What is blocked by this issue?
This causes duplicated events and inconsistent state handling in our Capacitor plugin.
Specifically:
Duplicate events are emitted to the JS layer
UI state may become inconsistent
Consumers need to add defensive logic to ignore duplicates
Code to reproduce
PaymentSheet.FlowController.create(
activity,
{ paymentOption: PaymentOption? ->
paymentFlowExecutor.onPaymentOption(
bridge,
paymentFlowCallbackId,
paymentOption
)
},
{ result: PaymentSheetResult ->
paymentFlowExecutor.onPaymentFlowResult(
bridge,
paymentFlowCallbackId,
result
)
}
)
Result: onPaymentOption is invoked multiple times
Expected: onPaymentOption should be invoked exactly once per selection
Android version
ext {
minSdkVersion = 26
compileSdkVersion = 34
targetSdkVersion = 34
androidxActivityVersion = '1.8.0'
androidxAppCompatVersion = '1.6.1'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.12.0'
androidxFragmentVersion = '1.6.2'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.9.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1'
}
Impacted devices
Use Google Pixel 8a
Installation method
gradle dependency
Summary
Hi, I'm the maintainer of @capacitor-community/stripe.
After upgrading to stripe-android v23.2.0, the
onPaymentOptioncallback passed toPaymentSheet.FlowController.create()is invoked multiple times for a single user interaction.Note: This does not occur in v23.1 and later versions.
What is blocked by this issue?
This causes duplicated events and inconsistent state handling in our Capacitor plugin.
Specifically:
Duplicate events are emitted to the JS layer
UI state may become inconsistent
Consumers need to add defensive logic to ignore duplicates
Code to reproduce
Result: onPaymentOption is invoked multiple times
Expected: onPaymentOption should be invoked exactly once per selection
Android version
Impacted devices
Use Google Pixel 8a
Installation method
gradle dependency