1. Home
  2. Docs
  3. Axium
  4. API
  5. basket

basket

Initialization of basket

 IBasket basket = com.ingenico.sdk.basket.Basket.getInstance(myContext);

How to create item


BasketItem item = BasketItem.builder()
                .setItemName(itemName)
                .setQuantity(quantity)
                .setFormattedTotalItemPrice(price)
                .build();

Add an item to basket

 basketContent.addItem(item); 

add global price to basket :

 basketContent.setFormattedBasketPrice(price+" €");

set the content to basket

 basket.setContent(basketContent.build());

Display Basket

 basket.show(); 

Remove Basket

 basket.hide();

 

Note : all of These methods make network request and can be blocking, it must NOT be called from the main thread.

Was this article helpful to you? Yes 1 No

How can we help?