flutter_stripe
flutter_stripe copied to clipboard
Support auto-fill hints for CardFormField
Is your feature request related to a problem? (please describe)
Could you help to support auto-fill hints for CardFormField
like:

Android side can refer to https://developer.android.com/guide/topics/text/autofill-optimize
Describe the solution you'd like
just set auto-fill hints to corresponding EditText inside CardFormView
like:

Describe alternatives you've considered N/A
Additional context Actually I have already implemented this feature on the Android side locally, but it seems that I have no write access to this repo
I feel like this should be built in into the stripe-android and https://github.com/stripe/stripe-react-native/ repo - please consider asking there
@jonasbark I believe those already support autofill and we need a fix specific to the flutter implementation
@jonasbark I believe those already support autofill and we need a fix specific to the flutter implementation
yes that's what I meant, do u have any ETA for this?
What makes you believe that autofill is already supported and only the flutter side needs implementation of it? If the stripe-android library hasn't enabled it by default then we shouldn't do so either
What makes you believe that autofill is already supported and only the flutter side needs implementation of it? If the stripe-android library hasn't enabled it by default then we shouldn't do so either
could u plz read my descriptions carefully again? so that u can get my points, I already explained and shown how to implementate it on the flutter side LOL
could u plz read my answer carefully again? so that u can get my points, I already answered and shown my view on it LOL
If the stripe-android library hasn't enabled it by default then we shouldn't do so either
could u plz read my answer carefully again? so that u can get my points, I already answered and shown my view on it LOL
If the stripe-android library hasn't enabled it by default then we shouldn't do so either
u mean that u can not modify https://github.com/flutter-stripe/flutter_stripe/blob/6cdf95e6c0e6772f51fc0a92956174f658278a5c/packages/stripe_android/android/src/main/kotlin/com/reactnativestripesdk/CardFormView.kt ?
Sure I can, but the fact remains, stated now for the third time: If the stripe-android library hasn't enabled it by default then we shouldn't do so either
https://github.com/flutter-stripe/flutter_stripe/issues/1121#issuecomment-1444051822
Sure I can, but the fact remains, stated now for the third time: If the stripe-android library hasn't enabled it by default then we shouldn't do so either
well, let me try to create another issue into the stripe-android, thanks
just some additional clarification. The Flutter Stripe library is a Flutter wrapper around the existing Stripe sdks. We only build and maintain the dart layer and the native platform bindings, why not also native SDK? For many reasons most prominent are: security and maintainability. If we would change the native code it would cause an update nightmare with the next Stripe sdk and it is easy to break existing functionality or become incompatible.
That's why we always point to the official Stripe libraries.
thanks for the explanation
hi guys, previously I created another issue into stripe-android https://github.com/stripe/stripe-android/issues/6274 they said that auto-fill has been already supported on the android side,
as well as I looked into it from stripe-android source codes (it's supported indeed): https://github.com/stripe/stripe-android/blob/a7730140b1b457f4f2cb6aad64550b8dfda98afd/payments-core/src/main/java/com/stripe/android/view/CardNumberEditText.kt#L162 https://github.com/stripe/stripe-android/blob/a7730140b1b457f4f2cb6aad64550b8dfda98afd/payments-core/src/main/java/com/stripe/android/view/ExpiryDateEditText.kt#L243 https://github.com/stripe/stripe-android/blob/a7730140b1b457f4f2cb6aad64550b8dfda98afd/payments-core/src/main/java/com/stripe/android/view/CvcEditText.kt#L48 https://github.com/stripe/stripe-android/blob/a7730140b1b457f4f2cb6aad64550b8dfda98afd/payments-core/src/main/java/com/stripe/android/view/PostalCodeEditText.kt#L53
and auto-fill works well in the stripe-android example, but it doesn't work in the flutter-stripe example on the android device, may I know the reason?
@remonh87 Hi Remon, can you help explain the question above?
Any updates on this? Autofill would be really really nice even if just on Android.
@hcq0618 we are not using the android library wrappers but the react native wrappers. If they incorporate it in their sdk it will be automatically be part of our sdk for free.
@remonh87 hey bro, I also post an issue to the RN repo https://github.com/stripe/stripe-react-native/issues/1348, they also said it should be supported already, and I tried the RN's demo, auto-fill works well (just like strip-android demo), but it doesn't work in the flutter-stripe demo on the android device, this is really weird, do u know why?
We can confirm that we incorporated the latest stripe sdk but it doesn't work. Like @jonasbark said we have no control over the implementation it either works out of the box or it doesn't. The fact it doesn't work is either an issue in Stripe sdk or limitation of Flutter keyboard in relation to native views.
I asked some more info from the stripe team.
@remonh87 Any updates from Stripe team?
Is there any update on this issue?
It should work according to Stripe. There is not much that we can do further. I would recommend also using the paymentsheet which has superior UX and features when it comes to accessibility