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] Users cannot navigate out of "Pay" button when using remote/keyboard input for Android TV. #9784

Closed
acadetorres opened this issue Dec 13, 2024 · 12 comments
Labels
bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@acadetorres
Copy link

Summary

When paying using PaymentSheet, users cannot navigate out of "Pay" button when using keyboard/remote inputs.

Code to reproduce

fun presentPaymentSheet() {
showLoading(true)
devFeatures.isStripeOpen = true
paymentSheet.presentWithPaymentIntent(
paymentIntentClientSecret,
PaymentSheet.Configuration(
merchantDisplayName = getString(R.string.merchant),
customer = customerConfig,
allowsPaymentMethodsRequiringShippingAddress = false,
// Set allowsDelayedPaymentMethods to true if your business handles
// delayed notification payment methods like US bank accounts.
allowsDelayedPaymentMethods = true
)
)
}

Android version

Android 13 Android 13

Impacted devices

All

Installation method

Through gradle dependency,

Dependency Versions

kotlin:1.9.22
stripe-android: implementation ("com.stripe:stripe-android:21.2.1")
Android Gradle Plugin: gradle 8.11
Gradle:

SDK classes

PaymentSheet

Video

Video
https://we.tl/t-2eziP7lgns

Other information

@joyceqin-stripe
Copy link

Hi @acadetorres, thanks for reporting! We'll look into this.

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

Hi @joyceqin-stripe , thanks for checking it.

To add, even when using the old UI with this code,

paymentSheet.presentWithPaymentIntent(
            paymentIntentClientSecret,
            PaymentSheet.Configuration.Builder(getString(R.string.merchant))
                .merchantDisplayName(getString(R.string.merchant))
                .customer(customerConfig)
                .allowsDelayedPaymentMethods(true)
                .allowsPaymentMethodsRequiringShippingAddress(false)
                .paymentMethodLayout(PaymentSheet.PaymentMethodLayout.Horizontal)
                .build()
        )

Users are still unable to navigate out of "Pay" button.

@acadetorres
Copy link
Author

Also similar to the "Pay" issue, when users are trying to remove a card/payment method especially on multiple cards, users are unable to navigate in/out of the "Card" to be deleted.

@jaynewstrom-stripe
Copy link
Collaborator

Hi @acadetorres I'm unable to reproduce this issue. I'm using the android emulator, with the remotes directional pad. Could you provide some more information on how you are hitting this issue?

Screen_recording_20250102_155102.mp4

@acadetorres
Copy link
Author

Hi @jaynewstrom-stripe , thanks for checking it, basically, once you open the payment sheet, users are unable to navigate out of "pay" once focus reaches the button, please see video. After going down to "pay" users are unable to use arrows keys to get out of the "pay" button

Screen.Recording.2025-01-03.at.11.55.34.AM.mov

@jaynewstrom-stripe
Copy link
Collaborator

I'm still not able to recreate this issue (I'm using the up and down arrows on the directional pad).

What version of compose are you using?

@acadetorres
Copy link
Author

I followed this guide, https://docs.stripe.com/payments/accept-a-payment?platform=android&ui=payment-sheet

I am not using compose on this project rather XML views, Activities, Navigation Host, Fragments.

@jaynewstrom-stripe
Copy link
Collaborator

Just so I'm clear, are you clicking down on the directional pad (now the pay button is focused), and trying to click up on the directional pad to go back up to add a payment method?

If that's the case, and it's not working. Could you try adding compose 1.7 to your build.gradle via implementation 'androidx.compose.foundation:foundation:1.7.6' and try again?

@acadetorres
Copy link
Author

Hi Jay, after adding compose 1.7. We are now able to navigate out of "Pay" button.

Thank you so much @jaynewstrom-stripe

@jaynewstrom-stripe
Copy link
Collaborator

Great!

@jaynewstrom-stripe
Copy link
Collaborator

Note I made a fix related to Android TV here which should improve the experience for changing countries.

@acadetorres
Copy link
Author

Hi @jaynewstrom-stripe , thanks so much for the help.

Now only issue our customers are facing will be the on-screen keyboard "Next" and "Done" behavior from issue #9781

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

No branches or pull requests

3 participants