Open jlbuganan opened 4 years ago
The ability to put the postal code in the CreditCardView on Android was introduced in Stripe's 12.7 SDK release, and then made the default setting in 13.0. The plugin is currently based on 12.0. I've been unable to upgrade to 13 because of problems with {NS}'s support for Kotlin. (See https://github.com/NativeScript/android-runtime/issues/1604)
You could try changing the Stripe version in your copy of the plugin (update platforms/android/include.gradle) to 12.7.0, though I can't guarantee it would build. You may then be able to use CreditCardView.android.postalCodeEnabled = true
, or change that in stripe.android.js
directly
If you get it to work, you could send me a PR so I can incorporate it into the plugin. I don't plan on upgrading the Android Stripe SDK myself until the Kotlin issues are resolved, which may be awhile.
@RobertGardner Thanks for your suggestion, it seems to have worked. Posted up a PR (#117) to at least get the postal code showing in the CreditCardView on the Angular Intent Demo.
Unfortunately, I can't merge this PR because I can't upgrade to SDK 12.7 yet.
Stripe converted the entire SDK to Kotlin in v12.6 but given the {NS} Kotlin bugs mentioned earlier, the plugin doesn't work on v12.6 and greater. I thought the conversion was in v13, but was dismayed to see the conversion mentioned in the v12.6 release notes!
Interestingly, the only thing that is keeping me from moving forward is Source support. If you aren't using sources, you can go ahead and use v12.7 without problem (as far as I can tell). Sources are no longer the preferred mechanism for working with Stripe, but I'm reluctant to drop support for them at this point.
I'll keep this PR open in case someone else has the same request so they can see how to proceed. Also, once {NS} fixes the problems I can come back and work on this. I created a branch android-12.7
that has my progress to date.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
iOS on left, has ZIP input, Android on right, does not have ZIP input. How do I enable ZIP input on Android?