question

yerke avatar image
yerke asked yerke commented

Wrong subtotal amount when using ACTION_SECURE_PAY

When I use ACTION_SECURE_PAY to make a payment in the receipt I see subtotal = 0, even though total amount and tip amount are set correctly. Is it a bug? Is there a way to work around it?

I am using Clover Mini. Subtotal is 0 irrespective of the payment method that I use. Payments go through without any problems on my sandbox. I get a receipt by calling ACTION_START_PRINT_RECEIPTS after successful completion of ACTION_SECURE_PAY.

2 comments
10 |2000

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

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Did you add the payment to the order?

0 Likes 0 ·
yerke avatar image yerke commented ·

No, I made just a payment by passing corresponding parameters. I can't do that way?

0 Likes 0 ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered yerke commented

I suggest you don't call Secure Payments directly and instead use ACTION_CLOVER_PAY. The problem is that the the payment isn't added to the order locally so until the device syncs the order / payments DB will be in an invalid state. Calling ACTION_CLOVER_PAY is a different experience and will give the user the option of various tenders and split payment options however.

Unfortunately there's no way for you to add the payment locally. There's actually quite a few things that need to happen to do that correctly so it's not as trivial as you might thing. I consider it a bug that you don't have a way to do that. I've filed an internal issue to get this fixed.

6 comments
10 |2000

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

yerke avatar image yerke commented ·

Thanks for answer, Jeff. Is there a public issue tracker, so I can see status of the issues that I raised? Is it possible to programmatically make (add) an order with non-standard products that are not in Inventories? Will it help in my use case?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

No, we don't have a public issue tracker and unfortunately I don't have an ETA on a fix. The workaround I wrote above is the only one I'm aware of.

0 Likes 0 ·
yerke avatar image yerke commented ·

Is it possible to programmatically make (add) an order with non-standard products that are not in Inventories?

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

I don't know what is a "product". Do you mean an inventory item? Orders can have custom line items, which are line items not based on an inventory item.

0 Likes 0 ·
yerke avatar image yerke commented ·

Yes, I meant inventory items. Can you point me in the right direction on how to add custom line items in a new order programmatically? Thank you.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community