Developer's Guide
Mobile Payments Library Developer Guide and Reference – Android OS Edition July 2011 27
PayPalInvoiceItem
These items can be added to any InvoiceData.
NOTE: The UnitPrice and Quantity must multiply together correctly to equal the
TotalPrice. The TotalPrices of all invoiceItems of a PayPalPayment or a
PayPalAdvancedPayment must equal the subtotal of the payment.
Method
Description
setName(String name)
(Optional) – The name of the item.
setID(String ID)
(Optional) – A unique ID for the item.
setTotalPrice(BigDecimal
price)
(Requiredl) – The total cost of this item (unit cost * quantity).
setUnitPrice(BigDecimal
price)
(Required) – The cost of a single unit of this item.
setQuantity(int qty)
(Required) – The quantity of this item.
PayPalReceiverDetails
This object is used in the PayPalAdvancePayment to identify a single recipient.
Method
Description
setRecipient(String
recipient)
(Required) – The email address or phone number of this recipient.
setSubtotal(BigDecimal
amount)
(Required) – The subtotal of the payment to this recipient.
setIsPrimary(boolean
isPrimary)
(Optional) – Whether or not the receiver is a the primary receiver
of the payment. A payment with multiple recipients may specify
the primary recipient of the payment to denote a chained
payment. Payments with multiple recipients but no primary
receivers are parallel payments. See the section “Chained,
Parallel, and Simple Payments” for more details.
setPaymentType(int
paymentType)
(Optional) – If this value is not set, the value passed into
getPaymentButton() will be used instead.
setPaymentSubType(int
paymentSubtype)
(Optional) – If this value is not set, the value passed into
getPaymentButton() will be used instead.
setInvoiceData(PayPalInvo
iceData invoice)
(Optional) – The InvoiceData holds information such as tax and
shipping amounts as well as an optional breakdown of the items
included. See InvoiceData above for more details.
setCustomID(String ID)
(Optional) – The recipient's custom ID.
setMerchantName(String
name)
(Optional) - Displayed at the top of the library screen. If not set,
displays the recipient email or phone number string instead.