|
@ -1044,8 +1044,6 @@ namespace Business.Mobile |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//if (string.IsNullOrEmpty(kyc.idNumber))
|
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(kyc.idExpiryDate)) |
|
|
if (string.IsNullOrEmpty(kyc.idExpiryDate)) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
@ -2087,43 +2085,46 @@ namespace Business.Mobile |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
Log.Debug("SendNotification.EMAIL | REQUEST : " + JsonConvert.SerializeObject(request)); |
|
|
Log.Debug("SendNotification.EMAIL | REQUEST : " + JsonConvert.SerializeObject(request)); |
|
|
|
|
|
var resEmail = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.EMAIL); |
|
|
|
|
|
|
|
|
res = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.EMAIL); |
|
|
|
|
|
|
|
|
|
|
|
Log.Debug("SendNotification.EMAIL | RESPONSE : " + JsonConvert.SerializeObject(res)); |
|
|
|
|
|
|
|
|
Log.Debug("SendNotification.EMAIL | RESPONSE : " + JsonConvert.SerializeObject(resEmail)); |
|
|
emailSent = true; |
|
|
emailSent = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":sendSms"; |
|
|
string ProcessId = Guid.NewGuid().ToString().Replace("-", "") + ":sendSms"; |
|
|
var mobileNo = getSenderFormattedNumber(res.Extra3); |
|
|
|
|
|
SendSMSApiService _sendAPI = new SendSMSApiService(); |
|
|
|
|
|
StringBuilder s = new StringBuilder(); |
|
|
|
|
|
s.AppendLine($"Dear { pwdReset.Username}"); |
|
|
|
|
|
s.AppendLine($"We received your password reset request and your new credentials are"); |
|
|
|
|
|
s.AppendLine($"Login ID: { pwdReset.Username}"); |
|
|
|
|
|
s.AppendLine($"Password: { pwdReset.RandomPassword}"); |
|
|
|
|
|
s.AppendLine("Regards, IME London"); |
|
|
|
|
|
|
|
|
|
|
|
SMSRequestModel _req = new SMSRequestModel |
|
|
|
|
|
{ |
|
|
|
|
|
ProviderId = "onewaysms", |
|
|
|
|
|
MobileNumber = pwdReset.mobileNo, |
|
|
|
|
|
SMSBody = s.ToString(), |
|
|
|
|
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40), |
|
|
|
|
|
RequestedBy = pwdReset.Username, |
|
|
|
|
|
UserName = pwdReset.Username, |
|
|
|
|
|
method = "send", |
|
|
|
|
|
ControlNo = "", // GetControlNo()
|
|
|
|
|
|
}; |
|
|
|
|
|
Log.Debug("SendNotification.SMS | REQUEST : " + JsonConvert.SerializeObject(_req)); |
|
|
|
|
|
|
|
|
|
|
|
APIJsonResponse _resp = _sendAPI.SMSTPApi(_req); |
|
|
|
|
|
|
|
|
var mobileNo = ""; |
|
|
|
|
|
|
|
|
Log.Debug("SendNotification.SMS | RESPONSE : " + JsonConvert.SerializeObject(_resp)); |
|
|
|
|
|
smsSent = true; |
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(res.Extra3)) |
|
|
|
|
|
{ |
|
|
|
|
|
mobileNo = getSenderFormattedNumber(res.Extra3); |
|
|
|
|
|
|
|
|
|
|
|
SendSMSApiService _sendAPI = new SendSMSApiService(); |
|
|
|
|
|
StringBuilder s = new StringBuilder(); |
|
|
|
|
|
s.AppendLine($"Dear { res.Extra2}"); |
|
|
|
|
|
s.AppendLine($"We received your password reset request and your new credentials are"); |
|
|
|
|
|
s.AppendLine($"Login ID: { pwdReset.Username}"); |
|
|
|
|
|
s.AppendLine($"Password: { pwdReset.RandomPassword}"); |
|
|
|
|
|
s.AppendLine("Regards, IME London"); |
|
|
|
|
|
SMSRequestModel _req = new SMSRequestModel |
|
|
|
|
|
{ |
|
|
|
|
|
ProviderId = "onewaysms", |
|
|
|
|
|
MobileNumber = mobileNo, |
|
|
|
|
|
SMSBody = s.ToString(), |
|
|
|
|
|
ProcessId = ProcessId.Substring(ProcessId.Length - 40, 40), |
|
|
|
|
|
RequestedBy = pwdReset.Username, |
|
|
|
|
|
UserName = pwdReset.Username, |
|
|
|
|
|
method = "send", |
|
|
|
|
|
ControlNo = "", // GetControlNo()
|
|
|
|
|
|
}; |
|
|
|
|
|
Log.Debug("SendNotification.SMS | REQUEST : " + JsonConvert.SerializeObject(_req)); |
|
|
|
|
|
APIJsonResponse _resp = _sendAPI.SMSTPApi(_req); |
|
|
|
|
|
|
|
|
|
|
|
Log.Debug("SendNotification.SMS | RESPONSE : " + JsonConvert.SerializeObject(_resp)); |
|
|
|
|
|
smsSent = true; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
Log.Error("ResetPassword.SendNotification", ex); |
|
|
Log.Error("ResetPassword.SendNotification", ex); |
|
|
} |
|
|
} |
|
|
if (emailSent || smsSent) |
|
|
if (emailSent || smsSent) |
|
@ -2184,6 +2185,7 @@ namespace Business.Mobile |
|
|
Log.Debug("GetWalletStatement | Returning null while fetching the list of wallet statements."); |
|
|
Log.Debug("GetWalletStatement | Returning null while fetching the list of wallet statements."); |
|
|
return jsonRx; |
|
|
return jsonRx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
jsonRx.ErrorCode = "0"; |
|
|
jsonRx.ErrorCode = "0"; |
|
|
jsonRx.Data = liWalletStmtResponse; |
|
|
jsonRx.Data = liWalletStmtResponse; |
|
|
|
|
|
|
|
@ -2403,11 +2405,11 @@ namespace Business.Mobile |
|
|
var requiredList = props.Where(x => list.Any(z => x.Key.ToLower() == z.Field.ToLower())) |
|
|
var requiredList = props.Where(x => list.Any(z => x.Key.ToLower() == z.Field.ToLower())) |
|
|
.Where(y => string.IsNullOrEmpty(y.Value)).ToList(); // case when Field Value empty
|
|
|
.Where(y => string.IsNullOrEmpty(y.Value)).ToList(); // case when Field Value empty
|
|
|
|
|
|
|
|
|
var pLength = props.SingleOrDefault(p => p.Key.ToLower().Equals("mobile")).Value.Length; |
|
|
|
|
|
var rLength = list.SingleOrDefault(p => p.Field.ToLower().Equals("mobile")).MinLength; |
|
|
|
|
|
|
|
|
//var pLength = props.SingleOrDefault(p => p.Key.ToLower().Equals("mobile")).Value.Length;
|
|
|
|
|
|
//var rLength = list.SingleOrDefault(p => p.Field.ToLower().Equals("mobile")).MinLength;
|
|
|
|
|
|
|
|
|
if (pLength < rLength) |
|
|
|
|
|
requiredList.Add(new KeyValuePair() { Key = "mobile" }); |
|
|
|
|
|
|
|
|
//if (pLength < rLength)
|
|
|
|
|
|
// requiredList.Add(new KeyValuePair() { Key = "mobile" });
|
|
|
|
|
|
|
|
|
if (requiredList.Count > 0) |
|
|
if (requiredList.Count > 0) |
|
|
{ |
|
|
{ |
|
@ -3028,15 +3030,20 @@ namespace Business.Mobile |
|
|
var jsonS = reader.ReadToEnd(); |
|
|
var jsonS = reader.ReadToEnd(); |
|
|
options = JsonConvert.DeserializeObject<List<Option>>(jsonS); |
|
|
options = JsonConvert.DeserializeObject<List<Option>>(jsonS); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<Option> matchingOptions = new List<Option>(); |
|
|
|
|
|
|
|
|
foreach (var paymentMethod in paymentMethods) |
|
|
foreach (var paymentMethod in paymentMethods) |
|
|
{ |
|
|
{ |
|
|
var matchingOption = options.FirstOrDefault(option => option.Code == paymentMethod.Key); |
|
|
var matchingOption = options.FirstOrDefault(option => option.Code == paymentMethod.Key); |
|
|
if (matchingOption != null) |
|
|
if (matchingOption != null) |
|
|
{ |
|
|
{ |
|
|
matchingOption.Value = paymentMethod.Value; |
|
|
matchingOption.Value = paymentMethod.Value; |
|
|
|
|
|
matchingOptions.Add(matchingOption); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return options; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return matchingOptions; |
|
|
} |
|
|
} |
|
|
public JsonRxResponse ValidateReferralCode(string referralCode) |
|
|
public JsonRxResponse ValidateReferralCode(string referralCode) |
|
|
{ |
|
|
{ |
|
|