Guest User

Untitled

a guest
Oct 10th, 2018
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 1.18 KB | None | 0 0
  1. let imeDemoUsername = "tootle"
  2. let imeDemoPassword = "tootle123"
  3. let imeDemoMerchantCode = "TOOTLE"
  4. let imeDemoMerchantName = "Tootle"
  5. //let imeDemoMerchantUrl = "https://demo.dashboard.tt.hyperloopnepal.com/transactions/imeRecordData"
  6. let imeDemoMerchantUrl = "https://api.demo.ktm.tt.hyperloopnepal.com/transactions/imeRecordData"
  7. let imeDemoModule = "TOOTLE"
  8. let clientId: String = getDataFromPreference(key: CLIENT_ID)
  9. let timestamp = String(Double(String(Date().toMillis()))!)
  10. let imeDemoReferenceID:String = "C-\(clientId)-\(timestamp)"
  11.  
  12.  
  13. func imePayTask(amount: String) {
  14.         imeManager?.pay(withUsername: imeDemoUsername, password: imeDemoPassword, merchantCode: imeDemoMerchantCode, merchantName: imeDemoMerchantName, merchantUrl: imeDemoMerchantUrl, amount: amount, referenceId: imeDemoReferenceID, module: imeDemoModule, success: { (transactionInfo) in
  15.             print("IME DESC:", transactionInfo?.responseDescription)
  16.             showSnackbar(uiView: self.view, message: (transactionInfo?.responseDescription)!)
  17.         }, failure: { (transactionInfo, errorMessage) in
  18.             print(errorMessage)
  19. //            showSnackbar(uiView: self.view, message: )
  20.         })
  21.     }
Add Comment
Please, Sign In to add comment