1

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?

asked 2016-10-19 12:44:14 -0500

kocurek gravatar image

1 answer

Sort by  
0

From our dev team, Secure Pay does not support displaying line items - just the amount.

Your code, as written, worked fine for me and did not crash Pay Display. All looks good here; I'll email you a screenshot of the rendered Order. To be explicitly clear, creating instances of DisplayLineItem() and calling showDisplayOrder() are meant to show line items before payment is accepted.

Best,

Mark

answered 2016-10-19 18:15:33 -0500

mark.mullan gravatar image

updated 2016-10-20 20:00:56 -0500

Comments
1

Thank you, Mark! I was trying to show line items along with the payment process. I see where I went wrong now.

kocurek gravatar image
kocurek 2016-10-20 20:06:40 -0500