Android Paypal多项目开放类
我想为应用程序中的2项服务向用户收费,但我对Paypal Android SDK非常不熟悉。这是我到目前为止所拥有的Android Paypal多项目开放类,android,paypal,Android,Paypal,我想为应用程序中的2项服务向用户收费,但我对Paypal Android SDK非常不熟悉。这是我到目前为止所拥有的 public void onClick(View v) { PayPalPayment payment2 = new PayPalPayment(new BigDecimal("0.79"), "USD", "Network Fee"); Intent intent = new Intent(getBaseContext(),
public void onClick(View v) {
PayPalPayment payment2 = new PayPalPayment(new BigDecimal("0.79"), "USD", "Network Fee");
Intent intent = new Intent(getBaseContext(), PaymentActivity.class);
// comment this line out for live or set to PaymentActivity.ENVIRONMENT_SANDBOX for sandbox
intent.putExtra(PaymentActivity.EXTRA_PAYPAL_ENVIRONMENT, PaymentActivity.ENVIRONMENT_NO_NETWORK);
// it's important to repeat the clientId here so that the SDK has it if Android restarts your
// app midway through the payment UI flow.
intent.putExtra(PaymentActivity.EXTRA_CLIENT_ID, "credential-from-developer.paypal.com");
// Provide a payerId that uniquely identifies a user within the scope of your system,
// such as an email address or user ID.
intent.putExtra(PaymentActivity.EXTRA_PAYER_ID, "<xxxxxxxxxx.co.uk>");
intent.putExtra(PaymentActivity.EXTRA_RECEIVER_EMAIL, "<xxxxxxxxxx.com>");
intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment2);
startActivityForResult(intent, 0);
}
我尝试过创建多个意向和PaypalPayment类,但都没有效果。如果这太复杂而无法解释,请将我链接到教程系列
ps:我想在两个服务提供商之间分配付款
谢谢 目前,SDK只支持一种简单的支付方式。我建议让用户一次性支付全部金额 期待未来的改进,以便在2014年初获得详细的结果