question

Justin Cherniak avatar image
Justin Cherniak asked racheladmin Deactivated commented

Tips enabled = SALE response. Tips disabled = AUTH response?

Hello, I'm working on a semi-integration to our in-house POS system. Our system sells a variety of items, including merchandise (which can be food/drink orders), event registrations, equipment rentals and memberships. For everything that isn't specially tagged merchandise, we don't want to offer the customer a tipping option.

I have the test merchant to accept tips on screen and then added this to my code:
var saleRequest = new clover.remotepay.SaleRequest();
// Set amount, external ID, etc.
if (!externalOptions.tippableTransaction)
{
	saleRequest.setDisableTipOnScreen(true);
	// I also tried the following: options, none of which worked:
	saleRequest.setTipMode(TipMode.NO_TIP);
	saleRequest.setTipAmount(0);
	saleRequest.setTipeMode(TipMode.TIP_PROVIDED);
}
When I submit a sale request without any of this, it prompts the user for a tip and I get a SALE response:
"{"success":true,"result":"SUCCESS","payment":{"id":"MDRMKH833AHNJ","order":{"id":"KFDT8RNTT8V5T"},"tender":{"id":"FX23HYBP6XWYT","editable":false,"labelKey":"com.clover.tender.credit_card","label":"Credit Card","opensCashDrawer":false,"enabled":true,"visible":true,"instructions":null},"amount":1200,"tipAmount":0,"taxAmount":0,"cashbackAmount":null,"cashTendered":null,"externalPaymentId":"JDP79Z39HH4FD","employee":{"id":"DFLTEMPLOYEE"},"createdTime":1495624619943,"offline":false,"result":"SUCCESS","cardTransaction":{"cardType":"DISCOVER","entryType":"SWIPED","last4":"6668","type":"AUTH","authCode":"OK1403","referenceId":"714400000078","transactionNo":null,"state":"CLOSED","extra":{"cvmResult":"SIGNATURE","authorizingNetworkName":"DISCOVER"},"cardholderName":"DISCOVER TEST CARD","token":"7297162975886668","vaultedCard":{"first6":"601136","last4":"6668","cardholderName":"DISCOVER TEST CARD","expirationDate":"1218","token":"7297162975886668"}},"taxRates":null,"lineItemPayments":null,"transactionSettings":{"cardEntryMethods":34567,"disableCashBack":false,"cloverShouldHandleReceipts":false,"forcePinEntryOnSwipe":false,"disableRestartTransactionOnFailure":false,"allowOfflinePayment":false,"approveOfflinePaymentWithoutPrompt":false,"disableReceiptSelection":false,"disableDuplicateCheck":false,"autoAcceptPaymentConfirmations":false,"autoAcceptSignature":false}},"isSale":true,"isPreAuth":false,"isAuth":false,"signature":"..."}"
When I have any of the previous enabled, I am getting a pre-auth response:
"{"success":true,"result":"SUCCESS","payment":{"id":"RWQNWG3ZSDH4J","order":{"id":"VSWXQDZ1XGD4Y"},"tender":{"id":"FX23HYBP6XWYT","editable":false,"labelKey":"com.clover.tender.credit_card","label":"Credit Card","opensCashDrawer":false,"enabled":true,"visible":true,"instructions":null},"amount":1200,"tipAmount":null,"taxAmount":0,"cashbackAmount":null,"cashTendered":null,"externalPaymentId":"S38DT4S4J50KG","employee":{"id":"DFLTEMPLOYEE"},"createdTime":1495624093188,"offline":false,"result":"SUCCESS","cardTransaction":{"cardType":"DISCOVER","entryType":"SWIPED","last4":"6668","type":"PREAUTH","authCode":"OK8552","referenceId":"714400000077","transactionNo":null,"state":"PENDING","extra":{"cvmResult":"SIGNATURE","authorizingNetworkName":"DISCOVER"},"cardholderName":"DISCOVER TEST CARD","token":"7297162975886668","vaultedCard":{"first6":"601136","last4":"6668","cardholderName":"DISCOVER TEST CARD","expirationDate":"1218","token":"7297162975886668"}},"taxRates":null,"lineItemPayments":null,"transactionSettings":{"cardEntryMethods":34567,"disableCashBack":false,"cloverShouldHandleReceipts":false,"forcePinEntryOnSwipe":false,"disableRestartTransactionOnFailure":false,"allowOfflinePayment":false,"approveOfflinePaymentWithoutPrompt":false,"tipMode":"TIP_PROVIDED","disableReceiptSelection":false,"disableDuplicateCheck":false,"autoAcceptPaymentConfirmations":false,"autoAcceptSignature":false}},"isSale":false,"isPreAuth":false,"isAuth":true,"signature":"..."}"
Does this make any sense? If so, can someone explain. Also, either way, how do I selectively enable or disable tips on a per transaction basis?
Remote Pay Cloud
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

rachel avatar image
rachel Deactivated answered racheladmin Deactivated commented
As of Remote Pay Cloud 1.2.0, you can disable tips on a per-transaction basis with just:
saleRequest.setTipMode(TipMode.NO_TIP);
When a transaction initiated with cloverConnector.sale(saleRequest) is completed, it triggers the onSaleResponse callback, and response.getIsSale() should be true; we're investigating this issue.
2 comments
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.

As per our private discussion, response.getIsSale() is returning false and we aren't getting a closed sale, but an authorization.
0 Likes 0 ·

isSale returning false when it should return true has been fixed in Remote Pay Cloud 1.3.1.

0 Likes 0 ·

Welcome to the
Clover Developer Community