Guest User

Untitled

a guest
Jan 20th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. @Override
  2. protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  3. if (requestCode == REQUEST_CODE) {
  4. if (resultCode == Activity.RESULT_OK) {
  5. DropInResult result = data.getParcelableExtra(DropInResult.EXTRA_DROP_IN_RESULT);
  6. String payment_method_nonce=result.getPaymentMethodNonce().getNonce();
  7. submitNonce(payment_method_nonce);
  8. // use the result to update your UI and send the payment method nonce to your server
  9. } else if (resultCode == Activity.RESULT_CANCELED) {
  10. // the user canceled
  11. } else {
  12. // handle errors here, an exception may be available in
  13. Exception error = (Exception) data.getSerializableExtra(DropInActivity.EXTRA_ERROR);
  14. }
  15. }
  16. }
Add Comment
Please, Sign In to add comment