bool dotoken() { strtoken = Token.GenerateToken(); if (tokenInsertValidation(Program.UserID, Program.ApplicationCode, strtoken, false)) { try { var procesSms = new processSms.ProcessSms(); string strprocessSme = procesSms.SendSms(Program.Userphone, "Token", strtoken); if (strprocessSme.Contains("Failed")) { Tripous.Sys.ErrorBox(strprocessSme.ToString()); Common.setMessageBox(strprocessSme.ToString(), "Get Token", 1); return(false); } else { Common.setMessageBox(string.Format("Token Request sent to your registered number {0}.", $"********{Program.Userphone.Substring(7)}"), "Token Request", 1); //dt = DateTime.Now; return(true); } } catch (Exception ex) { Tripous.Sys.ErrorBox(ex.Message); return(false); } } else { return(false); } }
public static void dotoken() { strtoken = Token.GenerateToken(); if (CheckTokenperday()) { TaxSmartSuite.Class.Common.setMessageBox("Please use your current token received early on to authorized", "Token Request", 1); //return ; } else { if (tokenInsertValidation(Program.UserID, Program.ApplicationCode, strtoken, false, "New")) { #region Oldsms //SmsHelper sms = new SmsHelper("http://www.xpresspayonline.com/TestServers/IcmaSmsServer/", "446d8d01cd8d4d638767298273869e75", //"gyIoXz+UlBZm8gkUCwR1yG/vpG38XqJ5ngNQZSN9Rb8=", Guid.NewGuid().ToString("N")); //var response = sms.SendSms("XpressToken", Program.Userphone, strtoken); //if (Convert.ToBoolean(response) == true) //{ // // return true; //} //else // return false; //using (var receiptAka = new AkwaIbomReceiptServices.ReceiptService()) //{ // dataSet = receiptAka.DownloadData(ds, Program.stateCode); //} #endregion try { var procesSms = new processSms.ProcessSms(); string strprocessSme = procesSms.SendSms(Program.Userphone, "Token", strtoken); if (strprocessSme.Contains("Failed")) { Tripous.Sys.ErrorBox(strprocessSme.ToString()); TaxSmartSuite.Class.Common.setMessageBox(strprocessSme.ToString(), "Get Token", 1); //return false; } else { TaxSmartSuite.Class.Common.setMessageBox(string.Format("Token Request sent to your registered number {0}.", $"********{Program.Userphone.Substring(7)}"), "Token Request", 1); dt = DateTime.Now; //return true; } } catch (Exception ex) { Tripous.Sys.ErrorBox(ex.Message); //return false; } } //else //return false; } }