code: public boolean handlePaymentData(int requestCode, int resultCode, @NonNull Intent data) {
          if (resultCode == Activity.RESULT_CANCELED) {
              fetchCustomer();
              return false;
          } else if (resultCode == Activity.RESULT_OK) {
              switch (requestCode) {
                  case PAYMENT_METHOD_REQUEST: {
                      fetchCustomer();
                      return true;
                  }
                  case PAYMENT_SHIPPING_DETAILS_REQUEST: {
                      final PaymentSessionData paymentSessionData = data.getParcelableExtra(
                              PAYMENT_SESSION_DATA_KEY);
                      paymentSessionData.updateIsPaymentReadyToCharge(mPaymentSessionConfig);
                      mPaymentSessionData = paymentSessionData;
                      if (mPaymentSessionListener != null) {
                          mPaymentSessionListener.onPaymentSessionDataChanged(paymentSessionData);
                      }
                      return true;
                  }
                  default: {
                      break;
                  }
              }
          }
          return false;
      }
docs: Method to handle Activity results from Stripe activities. Pass data here from your
  host Activity's {@link Activity#onActivityResult(int, int, Intent)} function.
  
  @param requestCode the request code used to open the resulting activity
  @param resultCode a result code representing the success of the intended action
  @param data an {@link Intent} with the resulting data from the Activity
  @return {@code true} if the activity result was handled by this function,
  otherwise {@code false}