Please find the below link and check for your answer...
https://github.com/paypal/PayPal-Android-SDK
PayPal pp = PayPal.getInstance();
launchChainedPayment = pp.getCheckoutButton(this, PayPal.BUTTON_194x37, CheckoutButton.TEXT_PAY);
launchChainedPayment.setOnClickListener(this);
private void initLibrary() {
PayPal pp = PayPal.getInstance();
if(pp == null) {
pp = PayPal.initWithAppID(this, Constant.PAYPAL_APP_ID, Constant.server);
pp.setLanguage("en_US"); // Sets the language for the library.
pp.setFeesPayer(PayPal.FEEPAYER_EACHRECEIVER);
pp.setShippingEnabled(true);
pp.setDynamicAmountCalculationEnabled(false);
}
}
private PayPalAdvancedPayment makeChainedPayment(double priceDouble,double pricePrimary,String primary_email,JSONObject jsonObject) {
PayPalAdvancedPayment payment = new PayPalAdvancedPayment();
payment.setCurrencyType("USD");
payment.setMerchantName("PushND");
BigDecimal bigDecimalPrimary=new BigDecimal(String.valueOf(priceDouble));
PayPalReceiverDetails receiverPrimary = new PayPalReceiverDetails();
receiverPrimary.setRecipient(primary_email);
//receiverPrimary.setRecipient("adaptive_receiver_1@pushnd.com");
receiverPrimary.setSubtotal(bigDecimalPrimary);
receiverPrimary.setIsPrimary(true);
payment.getReceivers().add(receiverPrimary);
try {
JSONObject jsonObjectSecondary = jsonObject;
Iterator<Object> keys = jsonObjectSecondary.keys();
while (keys.hasNext())
{
String Key=String.valueOf(keys.next());
PayPalReceiverDetails receiverSecondary= new PayPalReceiverDetails();
receiverSecondary.setRecipient(jsonObjectSecondary.getJSONObject(Key).get("email").toString());
// receiverSecondary.setRecipient("adaptive_receiver_2@pushnd.com");
double priceSecondary=priceDouble*((Double.parseDouble(jsonObjectSecondary.getJSONObject(Key).get("profit_percent").toString()))/100);
BigDecimal bigDecimalSecondary=new BigDecimal(String.valueOf(priceSecondary));
receiverSecondary.setSubtotal(bigDecimalSecondary);
receiverSecondary.setIsPrimary(false);
payment.getReceivers().add(receiverSecondary);
}
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return payment;
}