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.
isGratuityEnabled
This property returns what type of tipping (if any) has been set in the TMS (Terminal Management Settings):
iOS
[[CardEaseMobile sharedInstance] isGratuityEnabled]
Android
CardEaseMobile.isGratuityEnabled( )
This returns a CardEaseMobileTippingEnum
, indicating which tipping types are supported (None, End of Day, On Device or Both)
setGratuityEnabled
To set support for tipping, setGratuityEnabled will need to be called as follows:
iOS
[[CardEaseMobile sharedInstance] setGratuityEnabled:tippingType configurationError: &e]
Android
CardEaseMobile.setGratuityEnabled(CardEaseMobileTippingEnum tippingType) throws ConfigurationException
Whereby tippingType
is an enum with the possible values:
Enumeration | |
---|---|
CardEaseMobileTippingEnumNone |
None |
CardEaseMobileTippingEnumOnDevice |
On device tipping |
CardEaseMobileTippingEnumEndOfDay |
End of day tipping |
CardEaseMobileTippingEnumBoth |
Both |
closeTransaction
Note: This is applicable only if End of Day Tipping has been enabled (ie, either CardEaseMobileTippingEnumEndOfDay
or CardEaseMobileTippingEnumBoth
). If CardEaseMobileTippingEnumNone
or 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:
iOS
[[CardEaseMobile sharedInstance] closeTransaction: cardEaseReference amount: authAmount gratuity: gratuityAmount reference: userReference error: &e]
Android
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.
Note: authAmount
and gratuityAmount
are in minor units e.g. "123" for $1.23