本文整理汇总了Java中com.google.android.gms.wallet.WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR属性的具体用法?Java WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR怎么用?Java WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.android.gms.wallet.WalletConstants
的用法示例。
在下文中一共展示了WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleError
protected void handleError(int errorCode) {
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
Toast.makeText(this, getString(R.string.spending_limit_exceeded, errorCode),
Toast.LENGTH_LONG).show();
break;
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
String errorMessage = getString(R.string.google_wallet_unavailable) + "\n" +
getString(R.string.error_code, errorCode);
Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
break;
}
}
示例2: handleError
private void handleError(int errorCode) {
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
// may be recoverable if the user tries to lower their charge
// take the user back to the checkout page to try to handle
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
// take the user back to the checkout page to handle these errors
handleUnrecoverableGoogleWalletError(errorCode);
}
}
示例3: handleError
@Override
protected void handleError(int errorCode) {
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
Toast.makeText(getActivity(),
getString(R.string.spending_limit_exceeded, errorCode),
Toast.LENGTH_LONG).show();
break;
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
mGoogleWalletDisabled = true;
displayGoogleWalletErrorToast(errorCode);
break;
}
}
示例4: handleError
@Override
protected void handleError(int errorCode) {
if (checkAndRetryFullWallet(errorCode)) {
// handled by retrying
return;
}
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
// may be recoverable if the user tries to lower their charge
// take the user back to the checkout page to try to handle
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
// take the user back to the checkout page to handle these errors
handleUnrecoverableGoogleWalletError(errorCode);
}
}
示例5: handleError
@Override
protected void handleError(int errorCode) {
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
Toast.makeText(getActivity(),
getString(R.string.spending_limit_exceeded, errorCode),
Toast.LENGTH_LONG).show();
break;
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
handleUnrecoverableGoogleWalletError(errorCode);
break;
}
}
示例6: handleError
protected void handleError(int errorCode) {
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
Toast.makeText(this, getString(R.string.spending_limit_exceeded, errorCode),
Toast.LENGTH_LONG).show();
break;
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
String errorMessage = getString(R.string.google_wallet_unavailable) + "\n" +
getString(R.string.error_code, errorCode);
Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
break;
}
}
示例7: handleError
private void handleError(int errorCode) {
if (checkAndRetryFullWallet(errorCode)) {
// handled by retrying
return;
}
switch (errorCode) {
case WalletConstants.ERROR_CODE_SPENDING_LIMIT_EXCEEDED:
// may be recoverable if the user tries to lower their charge
// take the user back to the checkout page to try to handle
case WalletConstants.ERROR_CODE_INVALID_PARAMETERS:
case WalletConstants.ERROR_CODE_AUTHENTICATION_FAILURE:
case WalletConstants.ERROR_CODE_BUYER_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_MERCHANT_ACCOUNT_ERROR:
case WalletConstants.ERROR_CODE_SERVICE_UNAVAILABLE:
case WalletConstants.ERROR_CODE_UNSUPPORTED_API_VERSION:
case WalletConstants.ERROR_CODE_UNKNOWN:
default:
// unrecoverable error
// take the user back to the checkout page to handle these errors
handleUnrecoverableGoogleWalletError(errorCode);
}
}