Basket

public class Basket

Represents all of the items that have been added to the basket. Adding items should generally be performed through the com.verifone.payment_sdk.BasketManager, so that the display is updated and the appropriate events are sent. This object is useful to store the current basket, save it for later, then quickly restore all of the items to the screen, in case an order is put on hold and then retrieved. See com.verifone.payment_sdk.BasketManager.registerBasket for the method to restore a basket to the screen.

Methods

clear

public void clear()

Clears all of the items from this object.

create

public static Basket create()

getDonations

public ArrayList<Donation> getDonations()

Get any donations associated with this basket. These may change throughout the transaction.

getInvoiceId

public String getInvoiceId()

Get the invoice Id associated with this transaction and basket, which is intended to link a set of payments together.

getLoyaltyId

public String getLoyaltyId()

Refer to setLoyaltyId(StringloyaltyId) for more information.

getMerchandise

public ArrayList<Merchandise> getMerchandise()

Refer to setMerchandises(Merchandise[]merchandises) for more information.

getOffers

public ArrayList<Offer> getOffers()

Refer to setOffers(Offer[]offers) for more information.

setDonations

public void setDonations(ArrayList<Donation> donations)

Any donations associated with this basket. These may change throughout the transaction. This is optional.

setInvoiceId

public void setInvoiceId(String invoiceId)

Set the invoice Id associated with this transaction and basket, which is intended to link a set of payments together.

setLoyaltyId

public void setLoyaltyId(String loyaltyId)

The loyalty ID associated with this transaction and basket. This is set by the initiator of the transaction as the probable ID, and may be updated during the transaction process. This is optional.

setMerchandise

public void setMerchandise(ArrayList<Merchandise> merchandise)

The merchandise that is being purchased or returned. This should only be set by the POS or payment application. This is optional.

setOffers

public void setOffers(ArrayList<Offer> offers)

Any offers associated with this basket. These may change throughout the transaction. This is optional.