stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[Feature] Add setShippingInfoValidCallback to ShippingInfoWidget

Open tonyliu02 opened this issue 2 years ago • 3 comments

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

I am currently using ShippingInfoWidget, and I was trying to set a variable in my Android app based on if the inputs to the ShippingInfoWidget are all valid. However, there's no such function that sets up a listener listening for and validating user's input and reacts when every fields are valid. I noticed that in the CardMultilineWidget, there's a setCardValidCallback function, and I was wondering if something similar could be implemented for the ShippingInfoWidget.

Describe the solution you'd like

Add a function setShippingInfoValidCallback and the associated callback interface (like the CardValidCallback in CardMultilineWidget).

Describe alternatives you've considered

I tried ShippingInfoWidget's setOnClickListener and so on, but none of them solved my problem.

tonyliu02 avatar Jan 25 '23 20:01 tonyliu02

Hi @tonyliu02 👋 We’re no longer actively working on ShippingInfoWidget and recommend integrating with the Address Element. Would this integration work for your use case?

tillh-stripe avatar Jan 27 '23 21:01 tillh-stripe

@tillh-stripe I have tried the Address Element, however, I would like to use my app's own UI instead of using a pre-built address sheet that pops up. The reason I was using ShippingInfoWidget is because it has transparent background, and it could provide field validation, which are pretty nice. I was wondering if there's any alternative to using the Address Element so that the address widget has transparent background and could be integrated into my own UI?

tonyliu02 avatar Jan 30 '23 06:01 tonyliu02

That makes sense to me. I’ll bring this up with my team and will update you here if there’s any progress on adding field validation and the ability to integrate into your own UI.

tillh-stripe avatar Jan 30 '23 15:01 tillh-stripe

Hi @tonyliu02 Thank you for the suggestion! While we don't plan on building this at this time, we revisit our roadmap periodically and will keep this in mind. Please keep the ideas coming!

jaynewstrom-stripe avatar Jun 17 '24 18:06 jaynewstrom-stripe