question

kocurek avatar image
kocurek asked kocurek commented

remote-pay-cloud - Display Order

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?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Mark Mullan avatar image
Mark Mullan Deactivated answered kocurek commented

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

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kocurek avatar image kocurek commented ·

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

0 Likes 0 ·

Welcome to the
Clover Developer Community