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?