15. startResolutionForResult() の場合
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == requestCode used in startResolutionForResult) {
switch (resultCode) {
case Activity.RESULT_OK:
mMaskedWallet =
data.getParcelableExtra(WalletConstants.EXTRA_MASKED_WALLET);
break;
case Activity.RESULT_CANCELED:
// fetch a new ConnectionResult as below or you may
//go back to previous app flow
mWalletClient.loadMaskedWallet(
mwRequest,
maskedWalletLoadedListener);
break;
default:
int errorCode = data.getIntExtra(WalletConstants.EXTRA_ERROR_CODE,
-1);
handleError(errorCode);
}
}
}
13年5月29日水曜日
17. callback
@Override
public void onFullWalletLoaded(ConnectionResult result, FullWallet
fullWallet) {
if (result.isSuccess()) {
// The full wallet is received here
. . .
} else if (result.hasResolution()) {
try {
result.startResolutionForResult(getActivity(),
Constants.REQUEST_CODE_RESOLVE_LOAD_FULL_WALLET);
} catch (SendIntentException e) {
// retry loading the full wallet
. . .
}
}
}
13年5月29日水曜日
22. Card Type Card Number CSC Expiration Date
American Express 3782 8224 6310 005 any four digits any future date
Discover 6011 0999 0037 2372 any three digits any future date
MasterCard 5555 5555 5555 4444 any three digits any future date
Visa 4111 1111 1111 1111 any three digits any future date
13年5月29日水曜日