Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let imeDemoUsername = "tootle"
- let imeDemoPassword = "tootle123"
- let imeDemoMerchantCode = "TOOTLE"
- let imeDemoMerchantName = "Tootle"
- //let imeDemoMerchantUrl = "https://demo.dashboard.tt.hyperloopnepal.com/transactions/imeRecordData"
- let imeDemoMerchantUrl = "https://api.demo.ktm.tt.hyperloopnepal.com/transactions/imeRecordData"
- let imeDemoModule = "TOOTLE"
- let clientId: String = getDataFromPreference(key: CLIENT_ID)
- let timestamp = String(Double(String(Date().toMillis()))!)
- let imeDemoReferenceID:String = "C-\(clientId)-\(timestamp)"
- func imePayTask(amount: String) {
- imeManager?.pay(withUsername: imeDemoUsername, password: imeDemoPassword, merchantCode: imeDemoMerchantCode, merchantName: imeDemoMerchantName, merchantUrl: imeDemoMerchantUrl, amount: amount, referenceId: imeDemoReferenceID, module: imeDemoModule, success: { (transactionInfo) in
- print("IME DESC:", transactionInfo?.responseDescription)
- showSnackbar(uiView: self.view, message: (transactionInfo?.responseDescription)!)
- }, failure: { (transactionInfo, errorMessage) in
- print(errorMessage)
- // showSnackbar(uiView: self.view, message: )
- })
- }
Add Comment
Please, Sign In to add comment