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

Regarding PaymentSheet class #9083

Open
omertanveer opened this issue Aug 16, 2024 · 2 comments
Open

Regarding PaymentSheet class #9083

omertanveer opened this issue Aug 16, 2024 · 2 comments
Labels

Comments

@omertanveer
Copy link

Hi.

I am trying to create 2 separate instances of PaymentSheet in an android activity, lets say ActivityA.
So I have 2 separate objects PaymentSheetA and PaymentSheetB

Both of these payment sheets have their own separate createIntentCallbacks i.e, createIntentCallbackA and createIntentCallbackB

However when I call presentWithIntentConfiguration for PaymentSheetA, fill in the card details and press the pay button on the payment sheet, it ends up calling createIntentCallbackB instead of createIntentCallbackA.

Is somehow the PaymentSheet allowing only one payment sheet creation per activity?
If someone tries to create 2 payment sheet objects, does the createIntentCallback get overridden by the latest one?

Would be great if someone can shed some light on this.

@jaynewstrom-stripe
Copy link
Collaborator

Hi @omertanveer

This is indeed a current limitation of our implementation when using CreateIntentCallback.

Can you tell us more about your use case, and why you have nested activities that both could call PaymentSheet?

@omertanveer
Copy link
Author

I have one single activity.
Not nested activities.

We have a scenario where within a single activity where apart from a regular cart checkout we offer a separate subscription which gives some additional perks.

So in the case if a user decides to sign up for the subscription then I want to use one payment sheet for this purpose.

And then a second payment sheet that can allow user to continue with the regular cart checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants