braintree / braintree-android-drop-in

Braintree Drop-In SDK for Android
https://developers.braintreepayments.com/guides/drop-in/android/v2
MIT License
124 stars 79 forks source link

To skip payment sheet when Drop-In UI only has Credit Card payment method #318

Closed gordonchanhk closed 2 years ago

gordonchanhk commented 2 years ago

General information

Issue description

For Android Drop-in UI, it seems always prompt the Payment sheet, even when there is no vaulted payment method and only has Credit Card selection. https://github.com/braintree/braintree-android-drop-in/blob/5.3.0/Drop-In/src/main/java/com/braintreepayments/api/dropin/DropInActivity.java#L95-L122

For merchants who has their checkout page with different payment method listed, and use BT Drop-In UI for Credit Card checkout, alongside with other payment methods like Atome / APMs, upon selected Credit Card in their UI, the Drop-in UI ask for customer click the Credit Card from the payment sheet again so as to prompt the credit card form, this particular selection click step become unnecessary.

Compare with Drop-in UI for Web as well as Drop-in UI for iOS, it cans prompt credit card form without the payment method selection when there is no other payment method nor vaulted payment method in the payment sheet.

If Android Drop-in UI can have condition-check to prompt credit card form directly , this can help merchants save the unneeded click and they also no need to fully re-build all the Credit Card form feature (form validation / card type icon detection / 3DS / vaulted payment listing)

sarahkoop commented 2 years ago

Hi @gordonchanhk thanks for your feedback. This feature is not currently on our roadmap, but we will keep this issue open and post an update if it gets prioritized.

gordonchanhk commented 2 years ago

However I have done a comparison between web / ios / android dropin ui, only Android dropin behavior with that unnecessary click for credit card when only credit card is the only option in the payment sheet. And it doesn’t have way to call for the credit card form. Should this be aligned with other platform SDK? @sarahkoop

sarahkoop commented 2 years ago

This behavior is technically possible in the iOS Drop-in, but it requires the use of a class that will be come private in the next major version, and it is not the intended use of Drop-in. We are not planning to add that functionality for Android at this time.