Question

I am using braintree ios sdk for my iPhone app. I do not need zip code in payment form. How can I disable/remove the zip field?

Was it helpful?

Solution

Take a look at the headers file for BTPaymentFormView. There is a boolean property that you can set to change whether or not the zip code field is included:

@property (nonatomic, assign) BOOL requestsZip; // default is YES

If you are not using Venmo Touch and just creating a custom credit card form, it should be as simple as:

BTPaymentFormView *paymentForm = [BTPaymentFormView paymentFormView];
[paymentForm setRequestsZip:NO]];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top