Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (requestCode == REQUEST_CODE) {
- if (resultCode == Activity.RESULT_OK) {
- DropInResult result = data.getParcelableExtra(DropInResult.EXTRA_DROP_IN_RESULT);
- String payment_method_nonce=result.getPaymentMethodNonce().getNonce();
- submitNonce(payment_method_nonce);
- // use the result to update your UI and send the payment method nonce to your server
- } else if (resultCode == Activity.RESULT_CANCELED) {
- // the user canceled
- } else {
- // handle errors here, an exception may be available in
- Exception error = (Exception) data.getSerializableExtra(DropInActivity.EXTRA_ERROR);
- }
- }
- }
Add Comment
Please, Sign In to add comment