我想向用户收取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(), 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:我希望在两家服务提供商之间分配付款。
谢谢!
答案 0 :(得分:0)
目前,SDK仅支持一次简单付款。我建议让用户一次性支付总金额。
期待未来的改进,允许2014年初的逐项结果。