// Submit payment (i.e. "checkout")
  public void pay(Integer btype) {
    PayPalPayment payment;

    PayPal pp = PayPal.getInstance();
    if (pp == null) return;

    // mpjs_buttonType;

    // TBD: payment type: simple, parallel, chained
    payment = getSimplePayment();

    // Intent checkoutIntent = PayPal.getInstance().checkout(payment, this);
    Intent checkoutIntent = pp.checkout(payment, mpl_context, new ResultDelegate());

    // The next two lines should be exchanged for the following commented
    // line when PhoneGap is not used
    DroidGap dgActivity = (DroidGap) mpl_activity;
    dgActivity.startActivityForResult(PayPalPlugin.thisPlugin, checkoutIntent, 1);
    // mpl_activity.startActivityForResult(checkoutIntent, 1);
  }