Developer's Guide
26 July 2011 PayPal Mobile Payments Developer Guide and Reference – Android OS Edition
PayPalPreapproval
This object is passed to the library through extra data in the Intent when the Library Activity is
started. This object contains all the values for a payment
Method
Description
setCurrencyType(String
currency)
(Required) - Currency code for the payment. Defaults to USD if
not set.
setType(int type)
(Optional) – The type of button to display, either TYPE_AGREE
or TYPE_AGREE_AND_PAY. Defaults to
TYPE_AGREE_ANDPAY.
setIpnUrl(String IPNRUL)
(Optional) – The IPN URL
setMemo(String memo)
(Optional) – Note for the payment.
PayPalInvoiceData
This is an optional object to be set for any receiver. The PayPalPayment (simple payment) has
only one receiver and the InvoiceData is added directly to the payment object itself. The
PayPalAdvancedPayment can support multiple receivers, each of which can have an invoice data
added to it.
While InvoiceData is an optional parameter for any given receiver, once added the InvoiceData
must be populated with certain required parameters (see below).
Method
Description
setTax(BigDecimal
shipping)
(Required) – Tax amount to be used for the payment. This can be
updated after the checkout flow has been started if dynamic
amount calculation is enabled. The amount can be 0.
setShipping(BigDecimal
shipping)
(Required) – Shipping amount to be used for the payment. This
can be updated after the checkout flow has been started if
dynamic amount calculation is enabled. The amount can be 0.
setInvoiceItems(ArrayList
<PayPalInvoiceItem>
items)
(Required) – Sets the list of items in the invoice. See InvoiceItem
below for more details.These items do not affect the total
amount of the payment but must equal the subtotal.