You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
I need to send the list of item purchased and whose payments are being done using Paypal so that the buyer as well as the vendor can see that what products have been purchased or sold. Here is the snippet of what I did for the same, by following the Github code of PayPalCheckout but I get We'are Sorry dialog each time.
And here is the code I am using.
`private PayPalPayment prepareFinalCart() {
PayPalItem[] items = new PayPalItem[mPrograms.size()];
double price;
for (int i = 0; i < items.length; i++) {
Program program = mPrograms.get(i);
if (null != program.programPrices.get(program.selectedPriceIndex).priceAfterDiscount) {
price = program.programPrices.get(program.selectedPriceIndex).priceAfterDiscount;
} else {
price = program.programPrices.get(program.selectedPriceIndex).price;
}
PayPalItem item = new PayPalItem(program.type, 1, //Quantity
new BigDecimal(price), //price
Config.DEFAULT_CURRENCY, // currency
"sku-" + String.valueOf(program.id)); // stock keeping unit (SKU)
items[i] = item;
}
// Total amount
BigDecimal subtotal = new BigDecimal(mFinalCost);
// If you have shipping cost, add it here
BigDecimal shipping = new BigDecimal("0.0");
// If you have tax, add it here
BigDecimal tax = new BigDecimal("0.0");
PayPalPaymentDetails paymentDetails = new PayPalPaymentDetails(shipping, subtotal, tax);
BigDecimal amount = subtotal.add(shipping).add(tax);
PayPalPayment payment = new PayPalPayment(amount, Config.DEFAULT_CURRENCY, "Total Amount: "/*programsType.toString()*/, Config.PAYMENT_INTENT);
payment.items(items).paymentDetails(paymentDetails);
// Custom field like invoice_number etc.,
payment.custom("This is text that will be associated with the payment that the app can use.");
return payment;
}`
PayPal Mobile SDKs are Deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themselves will no longer be updated. Please use Braintree Direct in supported countries. In other countries, use Express Checkout and choose the Braintree SDK integration option.
I need to send the list of item purchased and whose payments are being done using Paypal so that the buyer as well as the vendor can see that what products have been purchased or sold. Here is the snippet of what I did for the same, by following the Github code of PayPalCheckout but I get We'are Sorry dialog each time.
And here is the code I am using.
`private PayPalPayment prepareFinalCart() {
@jaypatel512 please take a look.
The text was updated successfully, but these errors were encountered: