question

Michael Miscampbell avatar image
Michael Miscampbell asked ·

How to check if an Order has been Paid in Full ?

Hi

Can you confirm if there is a method or anyway for me to detect the following in the Clover SDK? - If an Order has been paid in full - If there is an Amount Outstanding on the Order

Currently the only solution I can see to calculate if an Order has been paid in FULL is to do the following: - Loop through all Payments on the Order - Deduct any Refunds, Service Charges or Voids

Can you help me to understand is the better solution or method inside the Clover SDK to achieve this ?

OrdersPayments
10 |2000 characters needed characters left characters exceeded

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

1 Answer

q_factor avatar image
q_factor answered ·

One solution would be to check the "state" of the order to see if the order is open, paid, partially paid, refunded etc., if your requirement stops there. You could use the getState method of Order class object for this. The state values are mentioned here.

Share
10 |2000 characters needed characters left characters exceeded

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

Welcome to the
Clover Developer Community