I have implemented the paypal sdk for parallel payment, when a user login to pay it shows a dropdown at the top showing all the receivers payment saperately. I want to remove the dropdown as its necessary in my app that paypal must show total payment instead of showing all the receivers payment individually(in red rectangle), I searched a lot for that but didn't find any solution can anybody suggest me for that.I am attaching screenshot so that it would be better to understand.
below is the screenshot how paypal showing all the recievers amount.
and below is that screenshot that how I want the total amount in my app
below is the code that how I am doing parallel payment
private PayPalAdvancedPayment exampleParallelPayment() {
float totalAmount = GlobalConfiguration.amountToPay;
float receiver_one_amount = 0;
float receiver_two_amount = 0;
if (totalAmount < 10) {
receiver_one_amount = (float) (totalAmount * 50) / 100;
receiver_two_amount = totalAmount - receiver_one_amount;
}
PayPalAdvancedPayment payment = new PayPalAdvancedPayment();
payment.setCurrencyType("USD");
payment.setIpnUrl("http://www.bella.com/ipn");
payment.setMemo("This sure is a swell memo for a parallel payment.");
// Create first receiver for the parallel payment
PayPalReceiverDetails receiver1 = new PayPalReceiverDetails();
receiver1.setRecipient("[email protected]");
receiver1.setSubtotal(new BigDecimal("" + receiver_two_amount));
receiver1.setIsPrimary(false);
// Sets the payment type. This can be PAYMENT_TYPE_GOODS,
// PAYMENT_TYPE_SERVICE, PAYMENT_TYPE_PERSONAL, or PAYMENT_TYPE_NONE.
receiver1.setPaymentType(PayPal.PAYMENT_TYPE_GOODS);
payment.getReceivers().add(receiver1);
// Create second receiver for the parallel payment
PayPalReceiverDetails receiver2 = new PayPalReceiverDetails();
receiver2.setRecipient("[email protected]");
receiver2.setSubtotal(new BigDecimal("" + receiver_one_amount));
receiver2.setIsPrimary(false);
receiver2.setPaymentType(PayPal.PAYMENT_TYPE_GOODS);
payment.getReceivers().add(receiver2);
return payment;
}
It seems there is no way to do so (from what I've seen in the docs). If you want to prevent showing all the receivers, you can use Chained Payments instead of Parallel Payments.