From 90bb3a2b7c2aa9a9a9926ce9a5caf81a32bd689f Mon Sep 17 00:00:00 2001 From: Edvinas Bartkus Date: Wed, 24 May 2017 09:48:52 +0300 Subject: [PATCH] Card validation in iOS By default, shouldValidate should be set to YES in order to validate card number and CVV code. --- ios/RCTBraintree/RCTBraintree.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/RCTBraintree/RCTBraintree.m b/ios/RCTBraintree/RCTBraintree.m index 94a0afd9..ef586139 100644 --- a/ios/RCTBraintree/RCTBraintree.m +++ b/ios/RCTBraintree/RCTBraintree.m @@ -129,6 +129,7 @@ - (instancetype)init { BTCardClient *cardClient = [[BTCardClient alloc] initWithAPIClient: self.braintreeClient]; BTCard *card = [[BTCard alloc] initWithNumber:cardNumber expirationMonth:expirationMonth expirationYear:expirationYear cvv:cvv]; + card.shouldValidate = YES; [cardClient tokenizeCard:card completion:^(BTCardNonce *tokenizedCard, NSError *error) {