com.braintreepayments.api.Card Java Examples
The following examples show how to use
com.braintreepayments.api.Card.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlutterBraintreeCustom.java From FlutterBraintree with MIT License | 5 votes |
protected void tokenizeCreditCard() { Intent intent = getIntent(); CardBuilder builder = new CardBuilder() .cardNumber(intent.getStringExtra("cardNumber")) .expirationMonth(intent.getStringExtra("expirationMonth")) .expirationYear(intent.getStringExtra("expirationYear")); Card.tokenize(braintreeFragment, builder); }
Example #2
Source File: AddCardActivity.java From braintree-android-drop-in with MIT License | 5 votes |
protected void createCard() { CardForm cardForm = mEditCardView.getCardForm(); if (mUnionPayCard) { UnionPayCardBuilder unionPayCardBuilder = new UnionPayCardBuilder() .cardholderName(cardForm.getCardholderName()) .cardNumber(cardForm.getCardNumber()) .expirationMonth(cardForm.getExpirationMonth()) .expirationYear(cardForm.getExpirationYear()) .cvv(cardForm.getCvv()) .postalCode(cardForm.getPostalCode()) .mobileCountryCode(cardForm.getCountryCode()) .mobilePhoneNumber(cardForm.getMobileNumber()) .enrollmentId(mEnrollmentId) .smsCode(mEnrollmentCardView.getSmsCode()); UnionPay.tokenize(mBraintreeFragment, unionPayCardBuilder); } else { boolean shouldVault = mClientTokenPresent && cardForm.isSaveCardCheckBoxChecked(); CardBuilder cardBuilder = new CardBuilder() .cardholderName(cardForm.getCardholderName()) .cardNumber(cardForm.getCardNumber()) .expirationMonth(cardForm.getExpirationMonth()) .expirationYear(cardForm.getExpirationYear()) .cvv(cardForm.getCvv()) .postalCode(cardForm.getPostalCode()) .validate(shouldVault); Card.tokenize(mBraintreeFragment, cardBuilder); } }
Example #3
Source File: Braintree.java From react-native-braintree-android with MIT License | 5 votes |
@ReactMethod public void getCardNonce(final String cardNumber, final String expirationMonth, final String expirationYear, final Callback successCallback, final Callback errorCallback) { this.successCallback = successCallback; this.errorCallback = errorCallback; CardBuilder cardBuilder = new CardBuilder() .cardNumber(cardNumber) .expirationMonth(expirationMonth) .expirationYear(expirationYear); Card.tokenize(this.mBraintreeFragment, cardBuilder); }
Example #4
Source File: CardActivity.java From braintree_android with MIT License | 5 votes |
public void onPurchase(View v) { setProgressBarIndeterminateVisibility(true); if (mIsUnionPay) { UnionPayCardBuilder unionPayCardBuilder = new UnionPayCardBuilder() .cardNumber(mCardForm.getCardNumber()) .expirationMonth(mCardForm.getExpirationMonth()) .expirationYear(mCardForm.getExpirationYear()) .cvv(mCardForm.getCvv()) .postalCode(mCardForm.getPostalCode()) .mobileCountryCode(mCardForm.getCountryCode()) .mobilePhoneNumber(mCardForm.getMobileNumber()) .smsCode(mSmsCode.getText().toString()) .enrollmentId(mEnrollmentId); UnionPay.tokenize(mBraintreeFragment, unionPayCardBuilder); } else { CardBuilder cardBuilder = new CardBuilder() .cardNumber(mCardForm.getCardNumber()) .expirationMonth(mCardForm.getExpirationMonth()) .expirationYear(mCardForm.getExpirationYear()) .cvv(mCardForm.getCvv()) .validate(false) // TODO GQL currently only returns the bin if validate = false .postalCode(mCardForm.getPostalCode()); Card.tokenize(mBraintreeFragment, cardBuilder); } }