There are two possible tipping options available in ChipDNA Mobile - End of Day and On Device.
As of ChipDNA Mobile SDK version 1.11, both End of Day and On Device tipping can be overridden by the integrator.
Note: In order to utilize the tipping feature, it will first need to be enabled on TMS. This can be enabled via a TMS Request.
This property returns what type of tipping (if any) has been set in the TMS (Terminal Management Settings):
[[CardEaseMobile sharedInstance] isGratuityEnabled]
This returns a
CardEaseMobileTippingEnum, indicating which tipping types are supported (None, End of Day, On Device or Both)
To set support for tipping, setGratuityEnabled will need to be called as follows:
[[CardEaseMobile sharedInstance] setGratuityEnabled:tippingType configurationError: &e]
CardEaseMobile.setGratuityEnabled(CardEaseMobileTippingEnum tippingType) throws ConfigurationException
tippingType is an enum with the possible values:
Note: This is applicable only if End of Day Tipping has been enabled (ie, either
CardEaseMobileTippingEnumOnDevice has been set, then the transaction will auto-confirm.
If End of Day Tipping has been enabled, transactions will remain in an uncommitted state until the transaction has been closed/confirmed. closeTransaction can be called as follows:
[[CardEaseMobile sharedInstance] closeTransaction: cardEaseReference amount: authAmount gratuity: gratuityAmount reference: userReference error: &e]
CardEaseMobile.closeTransaction(string cardEaseReference, string authAmount, string gratuityAmount, string userReference) throws ConfigurationException, TransactionException
If the amount and gratuity come to a total amount of 0 then the transaction will be voided.
gratuityAmount are in minor units e.g. "123" for $1.23