1
我如何添加一個PayPalReceiverDetails對象PayPalPayment對象(ANDROID PAYPAL SDK)如何在PayPalPayment方法中添加PayPalReceiverDetails? 。
,因爲沒有方法`getReceivers()在PayPalPayment添加(PayPalReceiverDetails),
這裏是我的代碼:
PayPalPayment payPalPayment = new PayPalPayment();
payPalPayment.setCurrencyType("USD");
payPalPayment.setRecipient("[email protected]");
payPalPayment.setSubtotal(new BigDecimal("1.00"));
payPalPayment.setPaymentType(PayPal.PAYMENT_TYPE_GOODS);
PayPalInvoiceData invoiceData = new PayPalInvoiceData();
invoiceData.setTax(new BigDecimal("0.00"));
invoiceData.setShipping(new BigDecimal("0.00"));
PayPalInvoiceItem invoiceItem = new PayPalInvoiceItem();
invoiceItem.setName("Samsung Gallexy S4 toy");
invoiceItem.setID("87238");
invoiceItem.setTotalPrice(new BigDecimal("1.00"));
invoiceItem.setUnitPrice(new BigDecimal("1.00"));
invoiceItem.setQuantity(1);
invoiceData.getInvoiceItems().add(invoiceItem);
payPalPayment.setInvoiceData(invoiceData);
payPalPayment.setMerchantName("The Store");
payPalPayment.setDescription("Pay Pal Example");
payPalPayment.setCustomID("1212121212");
payPalPayment.setIpnUrl("http://www.Test.com/ipn");
payPalPayment.setMemo("Test MEMO");
Intent chckoutIntent = PayPal.getInstance().checkout(payPalPayment, MainActivity.this,new ResultDelegate());
startActivityForResult(chckoutIntent, requestCode);