stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.3k stars 651 forks source link

[Feature] Jetpack Compose widget for the CardInputWidget #6601

Closed VinuPolly-Bonnet closed 5 months ago

VinuPolly-Bonnet commented 1 year ago

Is your feature request related to a problem? Please describe.

We are currently navigating the pre-existing UIs in our app and replacing them with Jetpack Compose Widgets, I wanted to know if there is currently a near future where the xml variant of CardInputWidget will be made available in Compose.

Describe the solution you'd like

Ideally the Compose variant of CardInputWidget

Describe alternatives you've considered

Right now we have experimented with using the XML view and using CardInputWidget within it, but this seems like a temporary fix

Additional context

I would ideally like to also use the PaymentSheet incase the Stripe is never planning to develop Compose widgets, but my only problem with it being it is not customisable and I also take Google Payments from our App's Payment Screen.

jaynewstrom-stripe commented 1 year ago

Hi @VinuPolly-Bonnet we don't have any plans to reimplement CardInputWidget in compose. Given it's possible to use it in compose with wrappers like AndroidView we've given this a relatively low priority.

If others are interested in this, feel free to 👍 the issue, or leave a comment.

VinuPolly-Bonnet commented 1 year ago

Hi @jaynewstrom-stripe , just checking what is the recommended way to take user's payment details in an android app when using Compose? is it;

jaynewstrom-stripe commented 1 year ago

Both should work!

PaymentSheet is our recommended integration path, and the one we're putting the majority of our effort into improving!

VinuPolly-Bonnet commented 1 year ago

Thanks @jaynewstrom-stripe , if we also perform Address verification while confirming payment, can the CardInputWidget be still used?

jameswoo-stripe commented 1 year ago

@VinuPolly-Bonnet, the CardInputWidget only verifies the postal code of the card. However, you should be able to attach the billing/shipping address to the intent before confirming payment.

PaymentSheet allows you to collect billing and shipping details through the Address Element.

ankitgusai commented 9 months ago

@jaynewstrom-stripe Can you please clarify my confusion about CardInputWidget and CardFormView? I've read comments on other issues here that CardInputWidget is in maintenance mode and no new features are added. Is that also the case for CardFormView?

Our payment flow requires us to integrate the Stripe component within our checkout page.

Thanks.

reference https://github.com/stripe/stripe-android/pull/3573 https://github.com/stripe/stripe-android/issues/4226#issuecomment-927889874

jaynewstrom-stripe commented 5 months ago

We still support CardInputWidget and CardFormView, and don't have plans to change that! But we're putting most of our effort into building the best checkout experience possible with PaymentSheet.

Since we don't plan on adding compose APIs for CardInputWidget, I'm going to close this.