question

rhyshintmd avatar image
rhyshintmd asked kamlakarkate answered

PaymentConnector - cancelling a sale before it completes

Hi, we are designing our payment system. We will be doing our custom app on the clover mini and use payment connector to do the payments.

My question is, after we issue a call to sale, -- between the steps where the user can tap the credit card and the time that the user hits OK after putting the signature (we will require a signature on the device), Is there a way to cancel this transaction from our code?


To give more context, our payment app (that uses the payment connector), is talking to our backend server where it may get a command telling it to cancel the transaction.

I'm not sure if this is still considered semi-integration or considered to be app market developer platform, but this app will only be used by us and will not be shown in the app market

Thanks,

Rhys


PaymentsPaymentConnector
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

There is a resetDevice method on PaymentConnector which will cancel any active transaction and return the device to the welcome screen. This method works on a Mini but may not work on a Station/Station 2018.

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.

rhyshintmd avatar image rhyshintmd commented ·

would the resetDevice restart the Clover mini or just the payment app?

I would assume as well that there is a chance when calling the resetDevice that the payment has been approved. What happens then? Would I get the onSaleResponse after the reset happens?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ rhyshintmd commented ·

It will set the device back to the welcome screen, not reboot it. You are correct, calling reset may void a payment. I am not certain if you will get a sale response in that case. However, we provide a retrieve payment API that will allow you to obtain the payment via external payment id and check the status.

0 Likes 0 ·
kamlakarkate avatar image
kamlakarkate answered

Any update on this?

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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