Skip to content

Commit

Permalink
Card validation in iOS
Browse files Browse the repository at this point in the history
By default, shouldValidate should be set to YES in order to validate card number and CVV code.
  • Loading branch information
edvinasbartkus authored May 24, 2017
1 parent 11fe781 commit 90bb3a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ios/RCTBraintree/RCTBraintree.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 90bb3a2

Please sign in to comment.