|
@ -198,11 +198,14 @@ namespace Business.Mobile |
|
|
{ |
|
|
{ |
|
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":sendSms"; |
|
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":sendSms"; |
|
|
SendSMSApiService _sendAPI = new SendSMSApiService(); |
|
|
SendSMSApiService _sendAPI = new SendSMSApiService(); |
|
|
|
|
|
string mobileNum = jsonRx.Extra2; |
|
|
|
|
|
var mobNum = getSenderFormattedNumber(mobileNum); |
|
|
|
|
|
|
|
|
SMSRequestModel _req = new SMSRequestModel |
|
|
SMSRequestModel _req = new SMSRequestModel |
|
|
{ |
|
|
{ |
|
|
ProviderId = "onewaysms", |
|
|
ProviderId = "onewaysms", |
|
|
MobileNumber =jsonRx.Extra2, |
|
|
|
|
|
SMSBody = Common.Model.Enum.NotifyTemplate.OTP_EMAIL.ToString(), |
|
|
|
|
|
|
|
|
MobileNumber = mobNum, //jsonRx.Extra2,
|
|
|
|
|
|
SMSBody = Common.Model.Enum.NotifyTemplate.OTP_EMAIL, |
|
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40), |
|
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40), |
|
|
RequestedBy = requestOTPModel.userId, |
|
|
RequestedBy = requestOTPModel.userId, |
|
|
UserName = requestOTPModel.userId, |
|
|
UserName = requestOTPModel.userId, |
|
@ -246,7 +249,44 @@ namespace Business.Mobile |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private string getSenderFormattedNumber(string number) |
|
|
|
|
|
{ |
|
|
|
|
|
string finalNo = number; |
|
|
|
|
|
|
|
|
|
|
|
if (!number.Contains("+44")) |
|
|
|
|
|
{ |
|
|
|
|
|
string mobileFirst = number.Substring(0, 1); |
|
|
|
|
|
if (mobileFirst == "0") |
|
|
|
|
|
{ |
|
|
|
|
|
if (number.Length == 11) |
|
|
|
|
|
{ |
|
|
|
|
|
finalNo = "+44" + number.Substring(1, number.Length - 1); |
|
|
|
|
|
return finalNo; |
|
|
|
|
|
} |
|
|
|
|
|
else if (number.Length < 11) |
|
|
|
|
|
{ |
|
|
|
|
|
finalNo = $"+44{number}"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else if (number.Substring(0, 1) != "0" && number.Length == 10) |
|
|
|
|
|
{ |
|
|
|
|
|
finalNo = $"+44{number}"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else if (number.Contains("+44")) |
|
|
|
|
|
{ |
|
|
|
|
|
string MobN = number.Substring(4, 1); |
|
|
|
|
|
|
|
|
|
|
|
if (MobN == "0" && number.Length > 14) |
|
|
|
|
|
{ |
|
|
|
|
|
finalNo = number.Remove(4, 1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (!finalNo.Substring(0, 1).Contains("+")) |
|
|
|
|
|
finalNo = $"+{finalNo}"; |
|
|
|
|
|
return finalNo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public JsonRxResponse VerifyIdNumber(IDValidateModel iDValidate) |
|
|
public JsonRxResponse VerifyIdNumber(IDValidateModel iDValidate) |
|
|
{ |
|
|
{ |
|
@ -2006,12 +2046,13 @@ namespace Business.Mobile |
|
|
|
|
|
|
|
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":sendSms"; |
|
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":sendSms"; |
|
|
SendSMSApiService _sendAPI = new SendSMSApiService(); |
|
|
SendSMSApiService _sendAPI = new SendSMSApiService(); |
|
|
|
|
|
|
|
|
//GetSMSTextForTxn
|
|
|
//GetSMSTextForTxn
|
|
|
SMSRequestModel _req = new SMSRequestModel |
|
|
SMSRequestModel _req = new SMSRequestModel |
|
|
{ |
|
|
{ |
|
|
ProviderId = "onewaysms", |
|
|
ProviderId = "onewaysms", |
|
|
MobileNumber = pwdReset.mobileNo, |
|
|
MobileNumber = pwdReset.mobileNo, |
|
|
SMSBody = Common.Model.Enum.NotifyTemplate.RESET_PASSWORD_EMAIL.ToString(), |
|
|
|
|
|
|
|
|
SMSBody = Common.Model.Enum.NotifyTemplate.RESET_PASSWORD_EMAIL, |
|
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40), |
|
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40), |
|
|
RequestedBy = pwdReset.Username, |
|
|
RequestedBy = pwdReset.Username, |
|
|
UserName = pwdReset.Username, |
|
|
UserName = pwdReset.Username, |
|
|