Skip to content

Instantly share code, notes, and snippets.

@SeraphimSerapis
Created November 19, 2012 15:52
Show Gist options
  • Save SeraphimSerapis/4111408 to your computer and use it in GitHub Desktop.
Save SeraphimSerapis/4111408 to your computer and use it in GitHub Desktop.
Initializes a chained payment
private void initChainedPayment() {
PayPalReceiverDetails receiver0 = new PayPalReceiverDetails();
PayPalReceiverDetails receiver1 = new PayPalReceiverDetails();
PayPalReceiverDetails receiver2 = new PayPalReceiverDetails();
receiver0.setIsPrimary(true);
// Setup additional information
PayPalAdvancedPayment payment = new PayPalAdvancedPayment();
payment.setCurrencyType("EUR");
payment.getReceivers().add(receiver0);
payment.getReceivers().add(receiver1);
payment.getReceivers().add(receiver2);
Intent paypalIntent = PayPal.getInstance().checkout(payment, context);
activity.startActivityForResult(paypalIntent, REQUEST_PAY);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment