- LimorAsked on June 14, 2015 at 04:23 AM
I'm writing an android app.
I succeed adding a paypal button to it, but I don't know how to make two fields configurable by custumer:
* product quantity
* costumer address
this is my code so far:
PayPalPayment newPayment = new PayPalPayment();
newPayment.setMerchantName("Picasso and PayPal");
PayPalInvoiceData invoice = new PayPalInvoiceData();
PayPalInvoiceItem item1 = new PayPalInvoiceItem();
// Sets the name of the item.
// Sets the total price which should be (quantity * unit price). The total prices of all PayPalInvoiceItem should add up
// to less than or equal the subtotal of the payment.
// Sets the unit price.
// Sets the quantity.
// Add the PayPalInvoiceItem to the PayPalInvoiceData. Alternatively, you can create an ArrayList<PayPalInvoiceItem>
// and pass it to the PayPalInvoiceData function setInvoiceItems().
BigDecimal st = milk_bags_cost[_value];
Intent checkoutIntent = PayPal.getInstance().checkout(newPayment, this /*, new ResultDelegate()*/);
// Use the android's startActivityForResult() and pass in our
// This will start the library.
//Intent paypalIntent = PayPal.getInstance().checkout(newPayment, this);
- JotForm SupportMike_GAnswered on June 14, 2015 at 01:46 PM
I would like to apologize, but I'm sure I am not understanding what you want here. Well, I understand that you would like to create an Android App that has a Payment form and you would like to include a Quantity field for customers to select the quantity of the product they are purchasing.
I'm not sure what the codes(included in your post) are for. I think this is what you would like to know: How-to-add-options-to-Payment-Forms.
You can create a Form here with JotForm and integrate Paypal with it. You can then open that form using your Android device's web browser.
Let us know how else we can be of assistance to you. Looking forward to your response. Thank you.