Summary: Nested Classes | Constants | Inherited Methods | [Expand All]
public final class

# WalletConstants

extends Object

java.lang.Object
↳ | com.google.android.gms.wallet.WalletConstants

## Class Overview

Collection of constant values used by the ClientLibrary.

## Summary

Nested Classes
@interface | WalletConstants.CardNetwork | Credit card networks.

Constants
String | ACTION_ENABLE_WALLET_OPTIMIZATION | Name of an action to use in an IntentFilter for a BroadcastReceiver that is a signal from your application that it uses Wallet, and thus the system should make the appropriate optimizations.
int | ENVIRONMENT_PRODUCTION | Environment constant for running in production with the most stringent application / merchant requirements.
int | ENVIRONMENT_SANDBOX | Deprecated environment, use `ENVIRONMENT_TEST` instead.
int | ENVIRONMENT_STRICT_SANDBOX | Deprecated environment, use `ENVIRONMENT_TEST` instead.
int | ENVIRONMENT_TEST | Environment constant for running in the test environment with relaxed application / merchant requirements.
int | ERROR_CODE_AUTHENTICATION_FAILURE | Not immediately recoverable error.
int | ERROR_CODE_BUYER_ACCOUNT_ERROR | Not immediately recoverable error.
int | ERROR_CODE_INVALID_PARAMETERS | Not immediately recoverable error.
int | ERROR_CODE_INVALID_TRANSACTION | Not immediately recoverable error.
int | ERROR_CODE_MERCHANT_ACCOUNT_ERROR | Not immediately recoverable error.
int | ERROR_CODE_SERVICE_UNAVAILABLE | Not immediately recoverable error.
int | ERROR_CODE_SPENDING_LIMIT_EXCEEDED | Recoverable error.
int | ERROR_CODE_UNKNOWN | Not immediately recoverable error.
int | ERROR_CODE_UNSUPPORTED_API_VERSION | Not immediately recoverable error.
String | EXTRA_ERROR_CODE | Extra for retrieving an error code from the Intent passed to onActivityResult
String | EXTRA_FULL_WALLET | Extra for retrieving a `FullWallet` from the Intent passed to onActivityResult
String | EXTRA_IS_NEW_USER | Extra for retrieving a boolean indicating if the user has previously used any Google accounts on the device to make purchases on your app.
String | EXTRA_IS_READY_TO_PAY | Extra for retrieving a boolean indicating with high, but not complete, confidence that the user is capable of making a payment using Android Pay
String | EXTRA_IS_USER_PREAUTHORIZED | Extra for retrieving a boolean indicating if the user has pre-authorized your app or not
String | EXTRA_MASKED_WALLET | Extra for retrieving a `MaskedWallet` from the Intent passed to onActivityResult
String | EXTRA_MASKED_WALLET_REQUEST | Extra for retrieving the masked wallet request from the Bundle passed to `onStateChanged(WalletFragment, int, int, android.os.Bundle)` when transitioning to `PROCESSING`.
String | METADATA_TAG_WALLET_API_ENABLED | Name of the metadata tag that is a signal from your application that it uses Wallet APIs.
int | RESULT_ERROR | Response code passed to onActivityResult in the case of an error
int | THEME_DARK | Theme constant passed to `setTheme(int)` to use a dark theme for Wallet on Android OS with `SDK_INT` >= `HONEYCOMB`.
int | THEME_HOLO_DARK | This constant is deprecated. use `THEME_DARK`
int | THEME_HOLO_LIGHT | This constant is deprecated. use `THEME_LIGHT`
int | THEME_LIGHT | Theme constant passed to `setTheme(int)` to use a light theme for Wallet on Android OS with `SDK_INT` >= `HONEYCOMB`.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Constants

#### public static final String ACTION_ENABLE_WALLET_OPTIMIZATION

Name of an action to use in an IntentFilter for a BroadcastReceiver that is a signal from your application that it uses Wallet, and thus the system should make the appropriate optimizations. Example of using the action: ...

Constant Value: "com.google.android.gms.wallet.ENABLE_WALLET_OPTIMIZATION"

#### public static final int ENVIRONMENT_PRODUCTION

Environment constant for running in production with the most stringent application / merchant requirements.

1. Requires the application is uploaded to the Google Play Store.
2. Requires a Google Wallet merchant account to be used to upload this application to the Google Play Store.

Constant Value: 1 (0x00000001)

#### public static final int ENVIRONMENT_SANDBOX

Deprecated environment, use `ENVIRONMENT_TEST` instead.

Constant Value: 0 (0x00000000)

#### public static final int ENVIRONMENT_STRICT_SANDBOX

Deprecated environment, use `ENVIRONMENT_TEST` instead.

Constant Value: 2 (0x00000002)

#### public static final int ENVIRONMENT_TEST

Environment constant for running in the test environment with relaxed application / merchant requirements. This environment is suggested for early development and for easily testing the Wallet SDK.

1. Does not require the application to be uploaded to the Google Play Store.
2. Does not require a Google Wallet merchant account to be used to upload this application to the Google Play Store.
3. It uses production data, but at the end of the transaction you will receive a fake and non chargeable payment credential.
4. The user will see a warning message that the app is not recognized/verified.

Constant Value: 3 (0x00000003)

#### public static final int ERROR_CODE_AUTHENTICATION_FAILURE

Not immediately recoverable error. There was a failure in retrieving an authentication token for the buyer's Google Account. This could be because Google's `AbstractAccountAuthenticator` is not installed or failed to respond, or could be due to an invalid Google account, or could be caused by some internal error. Note however that this error will NOT be returned if authentication failed because of a network error or because the buyer cancelled the operation.

##### See Also

- `NETWORK_ERROR`
- `RESULT_CANCELED`

Constant Value: 411 (0x0000019b)

#### public static final int ERROR_CODE_BUYER_ACCOUNT_ERROR

Not immediately recoverable error. There are problems with the buyer's account (e.g closed account, unsupported country)

Constant Value: 409 (0x00000199)

#### public static final int ERROR_CODE_INVALID_PARAMETERS

Not immediately recoverable error. The request had missing or invalid parameters.

Constant Value: 404 (0x00000194)

#### public static final int ERROR_CODE_INVALID_TRANSACTION

Not immediately recoverable error. loadFullWallet or changeMaskedWallet was called outside the context of a transaction. For example, loadFullWallet was called without a successful call to loadMaskedWallet.

Constant Value: 410 (0x0000019a)

#### public static final int ERROR_CODE_MERCHANT_ACCOUNT_ERROR

Not immediately recoverable error. There is a problem with the merchant Google Wallet account.

Constant Value: 405 (0x00000195)

#### public static final int ERROR_CODE_SERVICE_UNAVAILABLE

Not immediately recoverable error. The service is temporarily off-line for all requests.

Constant Value: 402 (0x00000192)

#### public static final int ERROR_CODE_SPENDING_LIMIT_EXCEEDED

Recoverable error. The payment amount in the request put the buyer over their spending limit. The buyer may still be able to use Google Wallet for a smaller purchase.

Constant Value: 406 (0x00000196)

#### public static final int ERROR_CODE_UNKNOWN

Not immediately recoverable error. An unknown type of error has occurred.

Constant Value: 413 (0x0000019d)

#### public static final int ERROR_CODE_UNSUPPORTED_API_VERSION

Not immediately recoverable error. The server API version of the request is no longer supported. This error is not recoverable and should be treated as fatal.

Constant Value: 412 (0x0000019c)

#### public static final String EXTRA_ERROR_CODE

Extra for retrieving an error code from the Intent passed to onActivityResult

Constant Value: "com.google.android.gms.wallet.EXTRA_ERROR_CODE"

#### public static final String EXTRA_FULL_WALLET

Extra for retrieving a `FullWallet` from the Intent passed to onActivityResult

Constant Value: "com.google.android.gms.wallet.EXTRA_FULL_WALLET"

#### public static final String EXTRA_IS_NEW_USER

Extra for retrieving a boolean indicating if the user has previously used any Google accounts on the device to make purchases on your app.

Constant Value: "com.google.android.gms.wallet.EXTRA_IS_NEW_USER"

#### public static final String EXTRA_IS_READY_TO_PAY

Extra for retrieving a boolean indicating with high, but not complete, confidence that the user is capable of making a payment using Android Pay

Constant Value: "com.google.android.gms.wallet.EXTRA_IS_READY_TO_PAY"

#### public static final String EXTRA_IS_USER_PREAUTHORIZED

Extra for retrieving a boolean indicating if the user has pre-authorized your app or not

Constant Value: "com.google.android.gm.wallet.EXTRA_IS_USER_PREAUTHORIZED"

#### public static final String EXTRA_MASKED_WALLET

Extra for retrieving a `MaskedWallet` from the Intent passed to onActivityResult

Constant Value: "com.google.android.gms.wallet.EXTRA_MASKED_WALLET"

#### public static final String EXTRA_MASKED_WALLET_REQUEST

Extra for retrieving the masked wallet request from the Bundle passed to `onStateChanged(WalletFragment, int, int, android.os.Bundle)` when transitioning to `PROCESSING`.

Constant Value: "com.google.android.gms.wallet.EXTRA_MASKED_WALLET_REQUEST"

#### public static final String METADATA_TAG_WALLET_API_ENABLED

Name of the metadata tag that is a signal from your application that it uses Wallet APIs. Note: In future versions this metadata tag will be required in your application manifest to use Wallet APIs in your app. Example of using the tag: ...

Constant Value: "com.google.android.gms.wallet.api.enabled"

#### public static final int RESULT_ERROR

Response code passed to onActivityResult in the case of an error

##### See Also

- `RESULT_OK`
- `RESULT_CANCELED`

Constant Value: 1 (0x00000001)

#### public static final int THEME_DARK

Theme constant passed to `setTheme(int)` to use a dark theme for Wallet on Android OS with `SDK_INT` >= `HONEYCOMB`. This will provide the dark version of either Holo or Material based on the API level of the device.

Constant Value: 0 (0x00000000)

#### public static final int THEME_HOLO_DARK

This constant is deprecated.
use `THEME_DARK`

Theme constant passed to `setTheme(int)` to use Holo Dark theme for Wallet on Android OS with `SDK_INT` >= `HONEYCOMB`.

Constant Value: 0 (0x00000000)

#### public static final int THEME_HOLO_LIGHT

This constant is deprecated.
use `THEME_LIGHT`

Theme constant passed to `setTheme(int)` to use Holo Light theme for Wallet on Android OS with `SDK_INT` >= `HONEYCOMB`.

Constant Value: 1 (0x00000001)

#### public static final int THEME_LIGHT

Theme constant passed to `setTheme(int)` to use a light theme for Wallet on Android OS with `SDK_INT` >= `HONEYCOMB`. This will provide the light version of either Holo or Material based on the API level of the device.

Constant Value: 1 (0x00000001)