stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.12k stars 981 forks source link

Support for feature to hide postal code form in a specified country in PaymentSheetUI #1854

Open ippo012 opened 3 years ago

ippo012 commented 3 years ago

Summary

Hi Stripe Devs.

This is a suggestion regarding the PaymentSheetUI for stripe-ios. The premise is that the new PaymentSheetUI is a very nice solution.

In PaymentSheetUI, there is a postal code input form for AVS. (This may not be the correct understanding.) This can be controlled to show or hide by selecting the country.

I am developing in Japan, and Japanese credit card issuer do not generally support AVS. Therefore, for Japanese credit card users, the postal code input form at the time of payment is not necessary.

However, since Japan is a country with a postal code system, Japan is not defined in countriesWithNoPostalCodes. Therefore, the postal code input form will be displayed.

As mentioned above, even if a country has a postal code system, there are cases where a postal code input form is not necessary, so it would be great if there is an interface that can be customized to not show the form for certain countries, for example.

Please let me know if there are any mistakes or suggestions on this.

Best regards.

https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet https://stripe.com/docs/disputes/prevention/verification#avs-check https://github.com/stripe/stripe-ios/blob/591f54d11f6f60be609e294f7dd7570c0ad32b49/Stripe/STPPostalCodeValidator.swift#L183-L253

csabol-stripe commented 3 years ago

Hey @ippo012, thanks for the request! This is definitely something we are thinking about (i.e. adding the ability to always hide postal code field). No timeline to share at the moment but it is on our roadmap :)

kgaidis commented 2 years ago

This is possibly fixed?

sfriedman-stripe commented 4 months ago

Hi @ippo012, does our billingDetailsCollectionConfiguration solve your use case? You can read about this in our docs here