We are developing a custom tender and would like to disable some capabilities if the user has disabled cash as a tender type on their device.
How can you determine if the user has disabled cash tender on their Clover Station 2018?
We are developing a custom tender and would like to disable some capabilities if the user has disabled cash as a tender type on their device.
How can you determine if the user has disabled cash tender on their Clover Station 2018?
You can use the TenderConnector in the clover-android-sdk.
Docs are here: https://github.com/clover/clover-android-sdk/blob/master/clover-android-sdk/src/main/aidl/com/clover/sdk/v1/tender/ITenderService.aidl
The TenderConnector is here: https://github.com/clover/clover-android-sdk/blob/master/clover-android-sdk/src/main/java/com/clover/sdk/v1/tender/TenderConnector.java
Note that the returned Tender object has a getEnabled() method which returns false if the tender is disabled.
Thank you - I wrote something like this in kotlin - this uses label, but I saw in another example you could use labelkey
t.getLabelKey().equals("com.clover.tender.cash")
fun checkTenderStatus(tenderConnector: TenderConnector, tenderLabel: String): TenderStatus { val success = tenderConnector.connect() var result: TenderStatus = TenderStatus.Fail(Exception("Check Status Failed.")) if (success) { val tenders = tenderConnector.tenders val tender = tenders.find { it.label == tenderLabel } if (tender != null) { result = if (tender.enabled) { TenderStatus.Enabled } else { TenderStatus.NotEnabled } } else { result = TenderStatus.NotRun } } tenderConnector.disconnect() return result }
2 People are following this question.
Disabling Customer Payment Option also disables Merchant Tender
Custom tender payment result is not reflecting in the native Clover Register app
Usage of External PIN Debit Payment Tender
Disable Cash payment option through ACTION_CLOVER_PAY
Call custom tender directly from the app without open ACTION_SECURE_PAY