public class PaymentMethod
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CLIENT_SDK_META_DATA |
protected static java.lang.String |
INPUT |
protected static java.lang.String |
SINGLE_USE_TOKEN_ID |
protected static java.lang.String |
VARIABLES |
| Constructor and Description |
|---|
PaymentMethod() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deletePaymentMethod(BraintreeFragment fragment,
PaymentMethodNonce paymentMethodNonce)
Deletes a payment method owned by the customer whose id was used to generate the
ClientToken
used to create the BraintreeFragment. |
static void |
getPaymentMethodNonces(BraintreeFragment fragment)
Retrieves the current list of
PaymentMethodNonces for the current customer. |
static void |
getPaymentMethodNonces(BraintreeFragment fragment,
boolean defaultFirst)
Retrieves the current list of
PaymentMethodNonces for the current customer. |
protected static final java.lang.String SINGLE_USE_TOKEN_ID
protected static final java.lang.String VARIABLES
protected static final java.lang.String INPUT
protected static final java.lang.String CLIENT_SDK_META_DATA
public static void getPaymentMethodNonces(BraintreeFragment fragment, boolean defaultFirst)
PaymentMethodNonces for the current customer.
When finished, the List of PaymentMethodNonces will be sent to PaymentMethodNoncesUpdatedListener.onPaymentMethodNoncesUpdated(List).
fragment - BraintreeFragmentdefaultFirst - when true the customer's default payment method will be first in the list, otherwise
payment methods will be ordered my most recently used.public static void getPaymentMethodNonces(BraintreeFragment fragment)
PaymentMethodNonces for the current customer.
When finished, the List of PaymentMethodNonces will be sent to PaymentMethodNoncesUpdatedListener.onPaymentMethodNoncesUpdated(List).
fragment - BraintreeFragmentpublic static void deletePaymentMethod(BraintreeFragment fragment, PaymentMethodNonce paymentMethodNonce)
ClientToken
used to create the BraintreeFragment.
Note: This method only works with Android Lollipop (>= 21) and above.
This will invoke BraintreeErrorListener.onError(Exception) when
TokenizationKey is used.fragment - BraintreeFragmentpaymentMethodNonce - The payment method nonce that references a vaulted payment method.