Browse Source

Merge branch 'master' into feature/Redmine-17825-Email_Template

# Conflicts:
#	Business/Mobile/MobileServices.cs
Mobile-pdf
shakun 10 months ago
parent
commit
c72d67ff57
  1. 88
      Business/Mobile/MobileServices.cs
  2. 3
      Common/Model/Enum/Notifications.cs
  3. 2
      Repository/Mobile/MobileServicesRepo.cs

88
Business/Mobile/MobileServices.cs

@ -270,6 +270,7 @@ namespace Business.Mobile
return jsonRx;
}
}
public string getSenderFormattedNumber(string number)
{
string finalNo = number;
if (!number.Contains("+44"))
@ -1042,21 +1043,7 @@ namespace Business.Mobile
return jsonRx;
}
}
{
if (string.IsNullOrEmpty(kyc.otherOccupation))
{
enumString = RESPONSE_MSG.VALIDATE_FORM_9.ToString();
var map = Utilities.GetLanguageMapping(enumString, lang);
jsonRx.SetResponse("1", map.Message);
return jsonRx;
}
}
}
//if (string.IsNullOrEmpty(kyc.idNumber))
if (string.IsNullOrEmpty(kyc.idExpiryDate))
{
@ -2098,43 +2085,46 @@ namespace Business.Mobile
};
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;
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));
var mobileNo = "";
APIJsonResponse _resp = _sendAPI.SMSTPApi(_req);
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)
{
Log.Error("ResetPassword.SendNotification", ex);
}
if (emailSent || smsSent)
@ -2195,9 +2185,9 @@ namespace Business.Mobile
Log.Debug("GetWalletStatement | Returning null while fetching the list of wallet statements.");
return jsonRx;
}
jsonRx.ErrorCode = "0";
jsonRx.Data = liWalletStmtResponse;
jsonRx.Data = liWalletStmtResponse;
return jsonRx;
@ -2415,11 +2405,11 @@ namespace Business.Mobile
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
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)
{
@ -3029,7 +3019,7 @@ namespace Business.Mobile
}
}
public List<Option> GetPaymentMethods()
{
var paymentMethods = _requestServices.GetPaymentMethod();

3
Common/Model/Enum/Notifications.cs

@ -51,7 +51,8 @@ namespace Common.Model.Enum
TRANSACTION_SUCCESS = 15,
TF_NO_BALANCE = 16
TF_NO_BALANCE = 16,
NEW_REGISTER_WELCOME = 17,
}
}

2
Repository/Mobile/MobileServicesRepo.cs

@ -3005,7 +3005,7 @@ namespace Repository.Mobile
additionalIdName = item["fileName"].ToString();
else if (item["fileDescription"].ToString() == "additionalIdBackCustUpload")
additionalIdBackName = item["fileName"].ToString();
else if (item["fileDescription"].ToString() == "facePictureCustUpload")
else if (item["fileDescription"].ToString() == "SelfieCustUpload") //facePictureCustUpload
facePictureName = item["fileName"].ToString();
registerDate = item["REGISTERED_DATE"].ToString();

Loading…
Cancel
Save