I am trying to display the line items that are being charged to the customer but the Clover Mini keeps crashing.
I am testing this functionality like so:
var amount = parseInt($('input.payment_amount').val());
var item = new clover.order.DisplayLineItem();
item.setId(1234);
item.setName('Test Item');
item.setPrice(amount * 100);
var order = new clover.order.Order();
order.setTitle("Hi Trent");
order.setId(1234);
order.setTotal(amount * 100);
order.setLineItems([item]);
clover_connector.showDisplayOrder(order);
I receive the error on the Clover Mini stating Unfortunately, Pay Display Has Stopped
.
I would like to show the line items along with the amount while accepting the payment. Does anything stand out that I am doing wrong?