From 4468362e784daaa045c5e8ad6163ff2599ebf8d9 Mon Sep 17 00:00:00 2001 From: shakun Date: Mon, 9 Oct 2023 19:29:33 +0545 Subject: [PATCH] merge from master --- .../RegisterModel/UserRegisterResponse.cs | 74 +++++++++++++-- .../Models/TransactionModel/ExrateResponse.cs | 3 + .../TransactionModel/TrustPaymentRequest.cs | 1 + .../RegisterRepository/IRegisterRepository.cs | 2 +- .../RegisterRepository/RegisterRepository.cs | 56 +++++++++++ .../Controllers/TransactionController.cs | 43 +++------ .../Views/Account/ForceChangePassword.cshtml | 8 +- .../Views/Account/Index.cshtml | 6 +- .../Views/Account/ResetPassword.cshtml | 93 +++++++++++++++++-- 9 files changed, 235 insertions(+), 51 deletions(-) diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs index 8791d6d..5ca7bfc 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs @@ -6,6 +6,7 @@ using System.Net; using System.Text; using System.Threading.Tasks; using System.ComponentModel.DataAnnotations; +using CustomerOnlineV2.Common.Models.HomeModel; namespace CustomerOnlineV2.Common.Models.RegisterModel { @@ -32,23 +33,82 @@ namespace CustomerOnlineV2.Common.Models.RegisterModel public string? Extra2 { get; set; } public object? Data { get; set; } } + public class CustomerList : CommonResponse + { + public List? CustomerListModel { get; set; } + } + public class CustomerListModel + { + public string? flag { get; set; } + public string? customerId { get; set; } + //public string? password { get; set; } + + public string? firstName { get; set; } + public string? middleName { get; set; } + public string? lastName1 { get; set; } + public string? lastName2 { get; set; } + public string? country { get; set; } + public string? address { get; set; } + public string? state { get; set; } + public string? zipCode { get; set; } + public string? district { get; set; } + public string? city { get; set; } + public string? email { get; set; } + public string? homePhone { get; set; } + public string? workPhone { get; set; } + public string? mobile { get; set; } + public string? nativeCountry { get; set; } + public string? dob { get; set; } + public string? placeOfIssue { get; set; } + public string? customerType { get; set; } + public string? occupation { get; set; } + public string? isBlackListed { get; set; } + public string? createdBy { get; set; } + public string? createdDate { get; set; } + public string? modifiedBy { get; set; } + public string? modifiedDate { get; set; } + public string? approvedBy { get; set; } + public string? approvedDate { get; set; } + public string? isDeleted { get; set; } + public string? lastTranId { get; set; } + public string? sourceOfFound { get; set; } + public string? relationId { get; set; } + public string? relativeName { get; set; } + public string? address2 { get; set; } + public string? fullName { get; set; } + public string? postalCode { get; set; } + public string? idExpiryDate { get; set; } + public string? idType { get; set; } + public string? idNumber { get; set; } + public string? otherIdNumber { get; set; } + public string? telNo { get; set; } + public string? companyName { get; set; } + public string? gender { get; set; } + public string? salaryRange { get; set; } + public string? bonusPointPending { get; set; } + public string? totalSent { get; set; } + public string? idIssueDate { get; set; } + + public string? customerStatus { get; set; } + public string? isActive { get; set; } + public string? islocked { get; set; } + public string? sessionId { get; set; } + public string? AboutUs { get; set; } + } public class OnlineCustomerRegisterModel : CommonResponse { [Required(ErrorMessage = "Password required")] - [StringLength(100, ErrorMessage = "The {0} must be at least {2} and at most {1} characters long.", MinimumLength = 6)] public string Password { get; set; } - [Required] - [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] public string ConfirmPassword { get; set; } - - // public string customerPassword { get; set; } public string? flag { get; set; } public string? customerId { get; set; } + //public string? password { get; set; } + public string? membershipId { get; set; } public string? firstName { get; set; } public string? middleName { get; set; } @@ -81,8 +141,9 @@ namespace CustomerOnlineV2.Common.Models.RegisterModel public string? sourceOfFound { get; set; } public string? relationId { get; set; } public string? relativeName { get; set; } + public string? address2 { get; set; } - public string? fullName { get; set; } + public string? fullName { get; set; } public string? postalCode { get; set; } public string? idExpiryDate { get; set; } public string? idType { get; set; } @@ -112,6 +173,7 @@ namespace CustomerOnlineV2.Common.Models.RegisterModel public string? isActive { get; set; } public string? islocked { get; set; } public string? sessionId { get; set; } + public string? AboutUs { get; set; } } } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs index 059900b..c4b02fc 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/ExrateResponse.cs @@ -192,8 +192,11 @@ namespace CustomerOnlineV2.Common.Models.TransactionModel { public string? ControlNo { get; set; } public string? CollectAmount { get; set; } + public string? TransferAmount { get; set; } public string? CollectCurrency { get; set; } public string? ReceiverName { get; set; } + public string? SenderName { get; set; } + public string? PCountry { get; set; } public string? TransactionId { get; set; } } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/TrustPaymentRequest.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/TrustPaymentRequest.cs index 1f3361c..e32b9b4 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/TrustPaymentRequest.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/TransactionModel/TrustPaymentRequest.cs @@ -51,5 +51,6 @@ namespace CustomerOnlineV2.Common.Models.TransactionModel public string? responsesitesecurity { get; set; } public string? title { get; set; } + public string? token { get; set; } } } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs index 3b5e328..5c31590 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs @@ -13,7 +13,7 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository public interface IRegisterRepository { Task AddRegisterDetails(OnlineCustomerRegisterModel register); - // Task AddRegisterDetails(LoginResponse loginDetails); + Task GetTranCustomerById(LoginResponse loginDetails); Task GetAllNotificationDetails(LoginResponse loginDetails); } } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs index cc237b4..5135b1f 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs @@ -94,6 +94,62 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository return await Task.FromResult(model); } + public async Task GetTranCustomerById(LoginResponse loginDetails) + { + CustomerList _response = new CustomerList(); + try + { + var sql = "EXEC mobile_proc_online_customerMaster_V1"; + sql += " @Flag = " + _connHelper.FilterString("detail"); + sql += ",@customerId= " + _connHelper.FilterString(loginDetails.UserId); + //logger.LogDebug("HOMEREPOSITORY | GETTRANSACTIONDETAIL | SQL | " + sql); + var dt = _connHelper.ExecuteDataTable(sql); + + if (dt == null || dt.Rows.Count <= 0) + { + _response.ResponseCode = ResponseHelper.FAILED; + _response.ResponseMessage = "DB Null Error!"; + + //_logger.LogError("HOMEREPOSITORY | GETTRANSACTIONDETAIL | DB RESPONSE | " + JsonConvert.SerializeObject(_response)); + } + else + { + _response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]); + _response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]); + + List obj = new List(); + foreach (DataRow item in dt.Rows) + { + obj.Add(new CustomerListModel + { + fullName = Convert.ToString(item["fullName"]), + email = Convert.ToString(item["email"]), + mobile = Convert.ToString(item["mobile"]), + dob = Convert.ToString(item["dob"]), + zipCode = Convert.ToString(item["zipCode"]), + city = Convert.ToString(item["city"]), + country = Convert.ToString(item["countryName"]), + address = Convert.ToString(item["address1"]), + address2 = Convert.ToString(item["address2"]), + idType = Convert.ToString(item["idType"]), + idNumber = Convert.ToString(item["idNumber"]), + idIssueDate = Convert.ToString(item["idIssueDate"]), + idExpiryDate = Convert.ToString(item["idExpiryDate"]), + nativeCountry = Convert.ToString(item["ICountryName"]) + }); + } + _response.CustomerListModel = obj; + } + } + catch (Exception ex) + { + _response.ResponseCode = ResponseHelper.EXCEPTION; + _response.ResponseMessage = "Exception occured: " + ex.Message; + + //logger.LogError("HOMEREPOSITORY | GETTRANSACTIONDETAIL | EXCEPTION | " + JsonConvert.SerializeObject(_response)); + } + return await Task.FromResult(_response); + } public async Task GetAllNotificationDetails(LoginResponse loginDetails) { CustomerNotificationModel _response = new CustomerNotificationModel(); diff --git a/CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs b/CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs index bb06cb5..62a29ba 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs +++ b/CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs @@ -7,7 +7,6 @@ using Serilog.Context; using CustomerOnlineV2.Authorization; using System.Text; using System.Security.Cryptography; -using NuGet.Protocol.Plugins; using CustomerOnlineV2.Common.Models.HomeModel; using CustomerOnlineV2.Common.Models.AccountModel; @@ -149,13 +148,14 @@ namespace CustomerOnlineV2.Controllers } _request.sitesecurity = $"h{builder.ToString()}"; - TempData["TrustPaymentRequest"] = _request; + //TempData["TrustPaymentRequest"] = _request; //var _response = _transactionBusiness.saveTranData(_request, loginDetails); _logger.LogInformation($"Payment | RESPONSE | {JsonConvert.SerializeObject(_request)}"); + var _response = await _transactionBusiness.SaveTranData(_request, loginDetails); } return View(_request); @@ -186,38 +186,23 @@ namespace CustomerOnlineV2.Controllers var siteReference = Request.Query["sitereference"]; var transactionReference = Request.Query["transactionreference"]; - var _requestFromTempData = TempData["TrustPaymentRequest"] as TrustPaymentRequest; + //var _requestFromTempData = TempData["TrustPaymentRequest"] as TrustPaymentRequest; var _request = new TrustPaymentRequest { - - sitereference = _requestFromTempData?.sitereference, - stprofile = _requestFromTempData?.stprofile, - mainamount = _requestFromTempData?.mainamount, - billingfirstname = _requestFromTempData?.billingfirstname, - billinglastname = _requestFromTempData?.billinglastname, - billingstreet = _requestFromTempData?.billingstreet, - billingpostcode = _requestFromTempData?.billingpostcode, - billingtown = _requestFromTempData?.billingtown, - billingtelephone = _requestFromTempData?.billingtelephone, - customerpremise = _requestFromTempData?.customerpremise, - customerstreet = _requestFromTempData?.customerstreet, - customerpostcode = _requestFromTempData?.customerpostcode, - - errorcode = errorCode, - orderreference = orderReference, - paymenttypedescription = paymentTypeDescription, - requestreference = requestReference, - responsesitesecurity = responseSiteSecurity, - settlestatus = settleStatus, - transactionreference = transactionReference + + errorcode = errorCode.ToString(), + orderreference = orderReference.ToString(), + paymenttypedescription = paymentTypeDescription.ToString(), + requestreference = requestReference.ToString(), + responsesitesecurity = responseSiteSecurity.ToString(), + settlestatus = settleStatus.ToString(), + transactionreference = transactionReference.ToString() }; - var loginDetails = HttpContext.GetLoginDetails(); - - var _response = await _transactionBusiness.saveTranData(_request, loginDetails); - - return View(); + var loginDetails = HttpContext.GetLoginDetails(); + var _response = await _transactionBusiness.SaveTranData(_request, loginDetails); + return View(_request); } diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml index f260aa9..5d8d852 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ForceChangePassword.cshtml @@ -84,13 +84,17 @@

+
+ + +
- +
- +
diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml index 5de4cae..7c4f112 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml @@ -29,7 +29,7 @@ @@ -44,8 +44,8 @@ diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml index e891b75..7e657fe 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Account/ResetPassword.cshtml @@ -1,12 +1,66 @@ @model CustomerOnlineV2.Common.Models.AccountModel.PasswordResetModel @{ - Layout = "_Layout2"; + Layout = null; } - + + + + + + + + + + + + +
+ + + + + @@ -20,8 +74,8 @@
Reset passowrd is simple, your can reset your password right away

- - @* *@
+ @* *@ +
@@ -30,14 +84,14 @@
@* *@ - +
-
Dont have username ? Registration won't take more than 5 min, Register Now
+
Dont have username ? Registration won't take more than 5 min, Register Now
Already registered, Login Now
@@ -72,6 +126,25 @@
+
+
+
+
+
+
+

+ IME London is a product of Subhida UK Limited, Pentax House,South Hill Avenue, South Harrow, London, H2A 0D + + Company Registration No. 06432399 Subhida UK Ltd is authorized and regulated by the Financial Conduct + Authority (FCA)
under the Payment Service Regulations 2017. FCA Registration No. 576127 HMRC Registration No. XYML000000119350 +

+
+
+
+

© IME London, 2023

+
+
+