Tipsi-stripe: Remove Zip code field on <PaymentCardTextField />

Created on 24 Apr 2020  路  9Comments  路  Source: tipsi/tipsi-stripe

Before I have submitted the issue

[ x ] I have read an installation guide
[ x ] I know that for an iOS I need to install pods because I've read the installation guide
[ x ] I have read a linking guide and checked that everything is OK like in manual linking guide
[ x ] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

As of later versions of Stripe (I am using version 19.0.1), there is a new Zipcode field in . I looked around Stripe documentation on how to get it removed but it seems like I have to dig into the Stripe pods to get this working. Is there a way to get this working with the tipsi-stripe?

I read about it in the Stripe docs.

Environment

  • tipsi-stripe version: 8.0.0-beta.10
  • Last tipsi-stripe version where the issue was not reproduced (if applicable):
  • iOS or Android: 13.4.1
  • OS version: 10.15.4
  • React-Native version: 0.62

Screenshots, GIFs (Must have)

Screen Shot 2020-04-23 at 6 24 04 PM

enhancement wont-fix

Most helpful comment

@axelinternet FYI we patched this in our code. Our patch looked something like this:

--- a/node_modules/tipsi-stripe/ios/TPSStripe/TPSCardField.m
+++ b/node_modules/tipsi-stripe/ios/TPSStripe/TPSCardField.m
@@ -24,6 +24,7 @@ - (instancetype)initWithFrame:(CGRect)frame {
         _isFirstResponder = NO;
         _paymentCardTextField = [[STPPaymentCardTextField alloc] initWithFrame:self.bounds];
         _paymentCardTextField.delegate = self;
+        _paymentCardTextField.postalCodeEntryEnabled = NO;
         [self addSubview:_paymentCardTextField];
         self.backgroundColor = [UIColor clearColor];
     }

All 9 comments

Stuck on this issue too. Problematic for our users as they have most likely never had to enter their zip code in a credit card field before.

@AntonOtaner have you found any workaround in the meantime? I tried to find a way to at least localize the field but with no success

@axelinternet FYI we patched this in our code. Our patch looked something like this:

--- a/node_modules/tipsi-stripe/ios/TPSStripe/TPSCardField.m
+++ b/node_modules/tipsi-stripe/ios/TPSStripe/TPSCardField.m
@@ -24,6 +24,7 @@ - (instancetype)initWithFrame:(CGRect)frame {
         _isFirstResponder = NO;
         _paymentCardTextField = [[STPPaymentCardTextField alloc] initWithFrame:self.bounds];
         _paymentCardTextField.delegate = self;
+        _paymentCardTextField.postalCodeEntryEnabled = NO;
         [self addSubview:_paymentCardTextField];
         self.backgroundColor = [UIColor clearColor];
     }

No success on my end @axelinternet but I think trying the solution of @nchase is the best possible solution up to now.

@nchase Thanks that works great, at least for our specific case.

@nchase -- if you want to patch this against the experimental branch, I'd be happy to ship this as part of beta.11?

@fbartho Is this released as part of beta.11?

@An0r4k based on the code, I don't think this made it into beta.11, but it's also not clear if there's some other change there that makes this unnecessary.

Sorry I didn't see this comment for so many months, @fbartho. See this PR, if this is still useful: https://github.com/tipsi/tipsi-stripe/pull/690

Tossing the keyword Postal Code for all the non-americans out there, took me a hot second to find this thread.

why was this closed?

Was this page helpful?
0 / 5 - 0 ratings