Browse Source

sync from master

feature/19315_Customer-Registration-new
shakun 12 months ago
parent
commit
95b3763931
  1. 8
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/HomeBusiness/HomeBusiness.cs
  2. 2
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/HomeBusiness/IHomeBusiness.cs
  3. 5
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/RegisterBusiness/IRegisterBusiness.cs
  4. 5
      CustomerOnlineV2/CustomerOnlineV2.Business/Business/RegisterBusiness/RegisterBusiness.cs
  5. 17
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs
  6. 1
      CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs
  7. 10
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs
  8. 108
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs
  9. 2
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/IHomeRepository.cs
  10. 5
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs
  11. 11
      CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs
  12. 27
      CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs
  13. 12
      CustomerOnlineV2/CustomerOnlineV2/Controllers/HomeController.cs
  14. 3
      CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs
  15. 6
      CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml
  16. 30
      CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml
  17. 182
      CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml
  18. 32
      CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/Payment.cshtml
  19. 4
      CustomerOnlineV2/CustomerOnlineV2/wwwroot/css/styles-login.css

8
CustomerOnlineV2/CustomerOnlineV2.Business/Business/HomeBusiness/HomeBusiness.cs

@ -30,5 +30,13 @@ namespace CustomerOnlineV2.Business.Business.HomeBusiness
{
return await _homeRepo.GetDDLList(model, loginDetails);
}
public async Task<CustomerTransactionList> GetTranDetailById(string tranId)
{
return await _homeRepo.GetTranDetailById(tranId);
}
public async Task<CustomerReceiverModel> GetReceiverDetailById(string id)
{
return await _homeRepo.GetReceiverDetailById(id);
}
}
}

2
CustomerOnlineV2/CustomerOnlineV2.Business/Business/HomeBusiness/IHomeBusiness.cs

@ -8,5 +8,7 @@ namespace CustomerOnlineV2.Business.Business.HomeBusiness
Task<CustomerReceiverModel> GetCustomerReceiverList(LoginResponse loginDetails);
Task<CustomerTransactionList> GetCustomerTransactionList(LoginResponse loginDetails);
Task<CommonDropDownList> GetDDLList(CommonDropDownModel model, LoginResponse loginDetails);
Task<CustomerTransactionList> GetTranDetailById(string tranId);
Task<CustomerReceiverModel> GetReceiverDetailById(string id);
}
}

5
CustomerOnlineV2/CustomerOnlineV2.Business/Business/RegisterBusiness/IRegisterBusiness.cs

@ -1,4 +1,5 @@
using CustomerOnlineV2.Common.Models.RegisterModel;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.RegisterModel;
using System;
using System.Collections.Generic;
using System.Linq;
@ -9,7 +10,7 @@ namespace CustomerOnlineV2.Business.Business.RegisterBusiness
{
public interface IRegisterBusiness
{
Task<OnlineCustomerRegisterModel> AddCustomers(OnlineCustomerRegisterModel register);
Task<CommonResponse> AddCustomers(OnlineCustomerRegisterModel register);
Task<AddressListResponse> GetAddressList(AddressRequest addressRequest);
}
}

5
CustomerOnlineV2/CustomerOnlineV2.Business/Business/RegisterBusiness/RegisterBusiness.cs

@ -1,4 +1,5 @@
using CustomerOnlineV2.Api.API.TPApi;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.RegisterModel;
using CustomerOnlineV2.Repository.Repository.RegisterRepository;
using Microsoft.Extensions.Logging;
@ -26,9 +27,9 @@ namespace CustomerOnlineV2.Business.Business.RegisterBusiness
_registerRepository = registerRepository;
}
public async Task<OnlineCustomerRegisterModel> AddCustomers(OnlineCustomerRegisterModel register)
public async Task<CommonResponse> AddCustomers(OnlineCustomerRegisterModel register)
{
var model1 = await _registerRepository.GetRegisterDetails(register);
var model1 = await _registerRepository.AddRegisterDetails(register);
return model1;
}

17
CustomerOnlineV2/CustomerOnlineV2.Common/Models/HomeModel/HomeModel.cs

@ -11,6 +11,18 @@
public string? Country { get; set; }
public string? Mobile { get; set; }
public string? TransactionType { get; set; }
public string? tranStatus { get; set; }
public string? nprAmt { get; set; }
public string? tranId { get; set; }
public string? tranDate { get; set; }
public string? address { get; set; }
public string? collAmt { get; set; }
public string? serviceCharge { get; set; }
public string? customerPremium { get; set; }
public string? sentAmt { get; set; }
public string? exRate { get; set; }
public string? payoutAmt { get; set; }
public string? pAgent { get; set; }
}
public class CustomerReceiverModel : CommonResponse
@ -28,11 +40,16 @@
public string? Id { get; set; }
public string? TransactionMonth { get; set; }
public string? TransactionDay { get; set; }
public string? TransactionYear { get; set; }
public string? PaymentMethod { get; set; }
public string? PBankName { get; set; }
public string? Amount { get; set; }
public string? Status { get; set; }
public string? PCurrency { get; set; }
public string? cAmt { get; set; }
public string? serviceCharge { get; set; }
public string? acAmt { get; set; }
public string? pCountry { get; set;}
}
public class CommonDropDownModel

1
CustomerOnlineV2/CustomerOnlineV2.Common/Models/RegisterModel/UserRegisterResponse.cs

@ -112,5 +112,6 @@ 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; }
}
}

10
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/DocumentRepository/DocumentRepository.cs

@ -1,16 +1,6 @@
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.DocumentModel;
using CustomerOnlineV2.Repository.ConnectionHelper;
using CustomerOnlineV2.Repository.Repository.RegisterRepository;
using Microsoft.VisualBasic.FileIO;
using NPoco;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace CustomerOnlineV2.Repository.Repository.DocumentRepository
{

108
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/HomeRepository.cs

@ -156,5 +156,113 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository
return new CommonDropDownList { DropDownResponse = new List<DropDownResponse>() };
}
}
public async Task<CustomerTransactionList> GetTranDetailById(string tranId)
{
CustomerTransactionList _response = new CustomerTransactionList();
try
{
var sql = "EXEC PROC_DYNAMIC_TABLE";
sql += " @Flag = " + _connHelper.FilterString("tran-detail");
sql += ",@id = " + _connHelper.FilterString(tranId);
_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<CustomerTransaction> obj = new List<CustomerTransaction>();
foreach (DataRow item in dt.Rows)
{
obj.Add(new CustomerTransaction
{
cAmt = Convert.ToString(item["cAmt"]),
serviceCharge = Convert.ToString(item["serviceCharge"]),
acAmt = Convert.ToString(item["acAmt"]),
Amount = Convert.ToString(item["Amount"]),
PBankName = Convert.ToString(item["PBankName"]),
PaymentMethod = Convert.ToString(item["paymentMethod"]),
pCountry = Convert.ToString(item["pCountry"]),
Id = Convert.ToString(item["Id"]),
TransactionDay = Convert.ToString(item["tranDate"]),
Status = Convert.ToString(item["Status"])
});
}
_response.CustomerTransaction = 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<CustomerReceiverModel> GetReceiverDetailById(string id)
{
CustomerReceiverModel _response = new CustomerReceiverModel();
try
{
var sql = "EXEC PROC_DYNAMIC_TABLE";
sql += " @Flag = " + _connHelper.FilterString("cust-detail");
sql += ",@id = " + _connHelper.FilterString(id);
_logger.LogDebug("HOMEREPOSITORY | GETRECEIVERDETAIL | 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 | GETRECEIVERDETAIL | DB RESPONSE | " + JsonConvert.SerializeObject(_response));
}
else
{
_response.ResponseCode = Convert.ToInt16(dt.Rows[0]["errorCode"]);
_response.ResponseMessage = Convert.ToString(dt.Rows[0]["msg"]);
List<ReceiverModel> obj = new List<ReceiverModel>();
foreach (DataRow item in dt.Rows)
{
obj.Add(new ReceiverModel
{
tranStatus = Convert.ToString(item["tranStatus"]),
nprAmt = Convert.ToString(item["nprAmt"]),
Name = Convert.ToString(item["FullName"]),
Id = Convert.ToString(item["tranId"]),
tranDate = Convert.ToString(item["tranDate"]),
address = Convert.ToString(item["address"]),
Mobile = Convert.ToString(item["mobile"]),
collAmt = Convert.ToString(item["collAmt"]),
serviceCharge = Convert.ToString(item["serviceCharge"]),
customerPremium = Convert.ToString(item["customerPremium"]),
sentAmt = Convert.ToString(item["sentAmt"]),
exRate = Convert.ToString(item["exRate"]),
payoutAmt = Convert.ToString(item["payoutAmt"]),
pAgent = Convert.ToString(item["pAgent"])
});
}
_response.ReceiverModel = obj;
}
}
catch (Exception ex)
{
_response.ResponseCode = ResponseHelper.EXCEPTION;
_response.ResponseMessage = "Exception occured: " + ex.Message;
_logger.LogError("HOMEREPOSITORY | GETRECEIVERDETAIL | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
}
}
}

2
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/HomeRepository/IHomeRepository.cs

@ -8,5 +8,7 @@ namespace CustomerOnlineV2.Repository.Repository.HomeRepository
Task<CustomerReceiverModel> GetCustomerReceiverList(LoginResponse loginDetails);
Task<CustomerTransactionList> GetCustomerTransactionList(LoginResponse loginDetails);
Task<CommonDropDownList> GetDDLList(CommonDropDownModel model, LoginResponse loginDetails);
Task<CustomerTransactionList> GetTranDetailById(string id);
Task<CustomerReceiverModel> GetReceiverDetailById(string id);
}
}

5
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/IRegisterRepository.cs

@ -1,4 +1,5 @@
using CustomerOnlineV2.Common.Models.RegisterModel;
using CustomerOnlineV2.Common.Models;
using CustomerOnlineV2.Common.Models.RegisterModel;
using System;
using System.Collections.Generic;
using System.Linq;
@ -9,6 +10,6 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
{
public interface IRegisterRepository
{
Task<OnlineCustomerRegisterModel> GetRegisterDetails(OnlineCustomerRegisterModel register);
Task<CommonResponse> AddRegisterDetails(OnlineCustomerRegisterModel register);
}
}

11
CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/RegisterRepository/RegisterRepository.cs

@ -19,7 +19,7 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
_connHelper = connHelper;
}
public async Task<OnlineCustomerRegisterModel> GetRegisterDetails(OnlineCustomerRegisterModel model)
public async Task<CommonResponse> AddRegisterDetails(OnlineCustomerRegisterModel model)
{
try
{
@ -68,12 +68,15 @@ namespace CustomerOnlineV2.Repository.Repository.RegisterRepository
}
else
else if (dt.Rows[0]["ErrorCode"].Equals("0"))
{
model.ResponseCode = ResponseHelper.SUCCESS;
model.ResponseMessage = ResponseMessageHelper.SUCCESS;
}
else
{
model.ResponseCode = ResponseHelper.FAILED;
model.ResponseMessage = dt.Rows[0]["Msg"].ToString();
}
}
catch (Exception ex)

27
CustomerOnlineV2/CustomerOnlineV2/Controllers/CustomerController.cs

@ -6,11 +6,8 @@ using CustomerOnlineV2.Common.Models.ReceiverModel;
using CustomerOnlineV2.Common.Models.RegisterModel;
using CustomerOnlineV2.Common.Models.TransactionModel;
using Microsoft.AspNetCore.Mvc;
using Microsoft.DotNet.Scaffolding.Shared.Messaging;
using Microsoft.Win32;
using Newtonsoft.Json;
using Serilog.Context;
using System.Reflection;
namespace CustomerOnlineV2.Controllers
{
@ -39,21 +36,21 @@ namespace CustomerOnlineV2.Controllers
[HttpPost]
[Authorization("AddCustomer")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> AddCustomer(OnlineCustomerRegisterModel register)
public async Task<CommonResponse> AddCustomer(OnlineCustomerRegisterModel register)
{
if (!ModelState.IsValid)
{
var register1 = await _registerBusiness.AddCustomers(register);
return View("CustomerRegistation", register1);
}
//return register1;
//return register;
return RedirectToPage("Index");
//return RedirectToAction("Success");
// AddressListResponse _response = new AddressListResponse();
// addressRequest.IpAddress = Utilities.GetIpAddressv2(HttpContext);
// addressRequest.ProcessId = Convert.ToString(Guid.NewGuid());
// using (LogContext.PushProperty("DebugId", addressRequest.ProcessId))
// {
// _logger.LogInformation($"GETADDRESSLIST | ADDRESSLIST | REQUEST | {JsonConvert.SerializeObject(addressRequest)}");
var register1 = await _registerBusiness.AddCustomers(register);
return register1;
// }
// return _response;
}

12
CustomerOnlineV2/CustomerOnlineV2/Controllers/HomeController.cs

@ -73,5 +73,17 @@ namespace CustomerOnlineV2.Controllers
var loginDetails = HttpContext.GetLoginDetails();
return await _homeBusiness.GetDDLList(model, loginDetails);
}
[HttpGet]
[Route("Home/GetTranDetail/{id}")]
public async Task<CustomerTransactionList> GetTranDetail(string id)
{
return await _homeBusiness.GetTranDetailById(id);
}
[HttpGet]
[Route("Home/GetReceiverDetail/{id}")]
public async Task<CustomerReceiverModel> GetReceiverDetail(string id)
{
return await _homeBusiness.GetReceiverDetailById(id);
}
}
}

3
CustomerOnlineV2/CustomerOnlineV2/Controllers/TransactionController.cs

@ -92,6 +92,7 @@ namespace CustomerOnlineV2.Controllers
return View(_response);
}
[Authorization("Payment")]
// [Authorization("SendMoney")]
public async Task<IActionResult> Payment([FromQuery] string id)
{
@ -109,7 +110,7 @@ namespace CustomerOnlineV2.Controllers
_request.sitereference = "test_subhidauk71992";
_request.stprofile = "default";
_request.currencyiso3a = "GBP";
_request.orderreference = Guid.NewGuid().ToString();
_request.orderreference = _tranresponse.ControlNo;
_request.mainamount = _tranresponse.TotalToPay;
_request.billingfirstname = _tranresponse.Firstname;
_request.billinglastname = _tranresponse.Lastname1;

6
CustomerOnlineV2/CustomerOnlineV2/Views/Account/Index.cshtml

@ -29,7 +29,7 @@
<!-- Logo
============================= -->
<div class="logo me-3">
<a class="d-flex" href="index.html" title="Money - HTML Template">
<a class="d-flex" href="/" title="Money - HTML Template">
<img src="images/imelondon.svg" height="35" alt="IME London - Logo" />
</a>
</div>
@ -44,8 +44,8 @@
<div id="header-nav" class="collapse navbar-collapse">
<ul class="navbar-nav me-auto">
<li><a href="faq.html">Help</a></li>
<li><a href="how-it-works.html">How It Works</a></li>
<li><a href="https://imelondon.co.uk/faqs" target="_blank">Help</a></li>
<li><a href="https://imelondon.co.uk/how-it-works" target="_blank">How It Works</a></li>
<li><a href="/Customer/CustomerRegistration">Register Now</a></li>
</ul>
</div>

30
CustomerOnlineV2/CustomerOnlineV2/Views/Customer/CustomerRegistration.cshtml

@ -16,6 +16,7 @@
<link href="~/vendor/owl.carousel/owl.carousel.min.css" rel="stylesheet" />
<link href="~/css/styles-login.css" rel="stylesheet" />
<link href="~/vendor/toast-alert/izitoast.min.css" rel="stylesheet" />
<script src="~/js/custom.js"></script>
<link rel="icon" type="image/png" href="favicon.png" />
<style>
input::-webkit-outer-spin-button,
@ -37,7 +38,7 @@
<!-- Logo
============================= -->
<div class="logo me-3">
<a class="d-flex" href="index.html" title="Money - HTML Template">
<a class="d-flex" href="home/index" title="Money - HTML Template">
<img src="images/imelondon.svg" height="35" alt="IME London - Logo" />
</a>
</div>
@ -52,8 +53,8 @@
<div id="header-nav" class="collapse navbar-collapse">
<ul class="navbar-nav me-auto">
<li><a href="faq.html">Help</a></li>
<li><a href="how-it-works.html">How It Works</a></li>
<li><a href="https://imelondon.co.uk/faqs" target="_blank">Help</a></li>
<li><a href="https://imelondon.co.uk/how-it-works" target="_blank">How It Works</a></li>
<li><a href="#">Register Now</a></li>
</ul>
</div>
@ -341,7 +342,7 @@
</div>
</div>
</div>
<div id="apiDataPopup" class="modal fade" role="dialog">
<div id="apiDataPopup" class="modal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
@ -362,7 +363,7 @@
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
@ -463,7 +464,7 @@
<div class="mb-4">
<div class="form-check d-flex align-items-center">
<input class="form-check-input me-2" type="checkbox" id="Terms">
<label class="form-check-label" for="Terms">I agree to IME London <a href="#" target="_blank">Terms &amp; Conditions</a> and <a href="#" target="_blank">Privacy Policy</a>.</label>
<label class="form-check-label" for="Terms">I agree to IME London <a href="https://imelondon.co.uk/terms-and-conditions" target="_blank">Terms &amp; Conditions</a> and <a href="https://imelondon.co.uk/privacy-policy" target="_blank">Privacy Policy</a>.</label>
</div>
</div>
</div>
@ -472,7 +473,8 @@
@* <button class="btn btn-lg btn-primary" type="submit">Register <i class="fa fa-window-maximize px-2" aria-hidden="true"></i></button> *@
<button type="submit" id="BtnRegister" class="btn btn-lg btn-primary" style="width: 250px;">
<span class="RegisterText">Register</span>&nbsp;<div class="spinner-border text-success loading" role="status" style="display:none;"></div> </button>
<span class="RegisterText">Register</span>&nbsp;<div class="spinner-border text-success loading" role="status" style="display:none;"></div>
</button>
</div>
</div>
</div>
@ -480,7 +482,7 @@
<div class="mt-3"> Already registered ? <a class="" href="login-new.html">Login Now</a></div>
<div class="mt-3"> Already registered ? <a class="" href="account/index">Login Now</a></div>
</div>
</div>
@ -539,7 +541,7 @@
<script src="~/vendor/owl.carousel/owl.carousel.min.js"></script>
<script src="~/js/script.js"></script>
<script src="~/vendor/toast-alert/izitoast.min.js"></script>
<script src="~/js/register-validation.js"></script>
@* <script src="~/js/register-validation.js"></script> *@
<script type="text/javascript">
@ -649,7 +651,7 @@ $(document).ready(function () {
if (passwordRegex.test(password)) {
passwordValidation.text("Valid password").css("color", "green");
} else {
passwordValidation.text("Invalid password").css("color", "red");
passwordValidation.text("Password should contain at least one special character (*&%$), one uppercase, one lowercase and min of 8 characters").css("color", "red");
}
});
@ -720,7 +722,7 @@ $(document).ready(function () {
let address2 = $('#address2').val();
let idIssueDate = $('#idIssueDate').val();
let idExpiryDate = $('#idExpiryDate').val();
let aboutus = $('#AboutUS').val();
let Data = {
@ -745,7 +747,7 @@ $(document).ready(function () {
Password: Password,
ConfirmPassword: ConfirmPassword,
postalCode: postalCode,
AboutUs: aboutus
@ -773,6 +775,8 @@ $(document).ready(function () {
}
window.location.replace("/account/index");
ShowAlertMessage(response.responseCode, response.responseMessage);
// clearFields();
// $('#Country').focus();
@ -818,7 +822,7 @@ $(document).ready(function () {
}
function EnableRegisterButton() {
debugger;
$('.RegisterText').show();
$('#BtnRegister').css('cursor', 'pointer');
$('.loadingSend').hide();

182
CustomerOnlineV2/CustomerOnlineV2/Views/Home/Index.cshtml

@ -1,7 +1,18 @@
@{
ViewData["Title"] = "Home Page";
}
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.text-3 {
font-size: 1rem !important;
}
</style>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="~/vendor/jquery/jquery.min.js"></script>
</head>
<!-- Profile Completeness -->
<div class="bg-white rounded p-4 mb-4">
@ -115,10 +126,10 @@
<div class="row g-0">
<div class="col-sm-5 d-flex justify-content-center bg-primary rounded-start py-4">
<div class="my-auto text-center">
<div class="text-17 text-white my-3"><i class="fas fa-building"></i></div>
<h3 class="text-4 text-white fw-400 my-3">Global IME Bank Ltd</h3>
<div class="text-8 fw-500 text-white my-4">$557.20</div>
<p class="text-white">15 March 2021</p>
<div class="text-17 text-white my-3" id="hpBankName"><i class="fas fa-building"></i></div>
<h3 class="text-4 text-white fw-400 my-3" id="hpAmt"></h3>
<div class="text-8 fw-500 text-white my-4" id="hDate" ></div>
<p class="text-white"></p>
</div>
</div>
<div class="col-sm-7">
@ -129,33 +140,33 @@
<hr>
<div class="px-3">
<ul class="list-unstyled">
<li class="mb-2">Payment Amount <span class="float-end text-3">$562.00</span></li>
<li class="mb-2">Fee <span class="float-end text-3">-$4.80</span></li>
<li class="mb-2" id="payAmt">Payment Amount <span class="float-end text-3"></span></li>
<li class="mb-2" id="serviceCharge">Fee <span class="float-end text-3"></span></li>
</ul>
<hr class="mb-2">
<p class="d-flex align-items-center fw-500 mb-0">Total Amount <span class="text-3 ms-auto">$557.20</span></p>
<p class="d-flex align-items-center fw-500 mb-0" id="tAmt">Total Amount <span class="text-3 ms-auto"></span></p>
<hr class="mb-2">
<p class="d-flex align-items-center fw-500 mb-0">Total Amount NPR <span class="text-3 ms-auto">Rs. 70000</span></p>
<p class="d-flex align-items-center fw-500 mb-0" id="tAmtNpr">Total Amount NPR <span class="text-3 ms-auto"></span></p>
<hr class="mb-4 mt-2">
<ul class="list-unstyled">
<li class="fw-500">Paid By:</li>
<li class="text-muted">Global IME Bank Ltd</li>
<li class="fw-500" id="pBankName">Paid By:</li>
<li class="text-muted"></li>
</ul>
<ul class="list-unstyled">
<li class="fw-500">Country:</li>
<li class="text-muted">Nepal</li>
<li class="fw-500" id="pCountry">Country:</li>
<li class="text-muted"></li>
</ul>
<ul class="list-unstyled">
<li class="fw-500">Transaction ID:</li>
<li class="text-muted">26566689645685976589</li>
<li class="fw-500" id="tranId">Transaction ID:</li>
<li class="text-muted"></li>
</ul>
<ul class="list-unstyled">
<li class="fw-500">Description:</li>
<li class="text-muted">GBIME March 2021 Member Payment</li>
<li class="fw-500" id="paymentMethod">Description:</li>
<li class="text-muted"></li>
</ul>
<ul class="list-unstyled">
<li class="fw-500">Status:</li>
<li class="text-muted">Completed<span class="text-success text-3 ms-1"><i class="fas fa-check-circle"></i></span></li>
<li class="text-muted" id="status"><span class="text-success text-3 ms-1"></span></li>
</ul>
</div>
</div>
@ -209,6 +220,59 @@
</div>
</div>
<!-- My Receiver List End -->
<!-- Receiver Details Modal
=========================================== -->
<div id="receiver-detail" class="modal fade" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered receiver-details" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="row g-0">
<div class="col-sm-5 d-flex justify-content-center bg-primary rounded-start py-4">
<div class="my-auto text-center">
<div class="text-17 text-white my-3" id="tranStatus"><i class="fas fa-building"></i></div>
<h3 class="text-4 text-white fw-400 my-3" id="nprAMt"></h3>
<div class="text-8 fw-500 text-white my-4">Send to</div>
<div class="text-17 fw-500 text-white my-4" id="receiverName"></div>
<div class="text-8 fw-500 text-white my-4">IME Control No.</div>
<div class="text-17 fw-500 text-white my-4" id="txnId"></div>
<p class="text-white"></p>
</div>
</div>
<div class="col-sm-7">
<h5 class="text-5 fw-400 m-3">
Transaction Details
<button type="button" class="btn-close text-2 float-end" data-bs-dismiss="modal" aria-label="Close"></button>
</h5>
<hr>
<div class="px-3">
<ul class="list-unstyled">
<li class="mb-2" id="recName">Receiver <span class="float-end text-3"></span></li>
<li class="mb-2" id="recAddress">Address <span class="float-end text-3"></span></li>
<li class="mb-2" id="recMobile">Mobile <span class="float-end text-3"></span></li>
</ul>
<hr class="mb-2">
<ul class="list-unstyled">
<li class="mb-2" id="collAmt">Collected Amount <span class="float-end text-3"></span></li>
<li class="mb-2" id="serviceFee">Service Fee <span class="float-end text-3"></span></li>
<li class="mb-2" id="rewardsPoints">Reward Amount Used <span class="float-end text-3"></span></li>
</ul>
<hr class="mb-2">
<p class="d-flex align-items-center fw-500 mb-0" id="tAmt">Total Sent Amount <span class="text-3 ms-auto"></span></p>
<hr class="mb-2">
<p class="d-flex align-items-center fw-500 mb-0" id="exRate">Exchange Rate <span class="text-3 ms-auto"></span></p>
<hr class="mb-2">
<p class="d-flex align-items-center fw-500 mb-0" id="nprPayAmt">Total Payout Amount <span class="text-3 ms-auto"></span></p>
<hr class="mb-2">
<p class="d-flex align-items-center fw-500 mb-0" id="payoutAgent">Payout Agent/Bank <span class="text-3 ms-auto"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Receiver Details Modal End -->
<!-- View all Link
=============================== -->
<div class="text-center mt-4">
@ -274,12 +338,11 @@
}
function PopulateReceiverData(response) {
debugger
var result = response.receiverModel;
if (response.responseCode == 0) {
let row = '';
$.each(result, function (i, d) {
row += '<div class="px-4 py-3">';
row += '<div class="transaction-item px-4 py-3" data-bs-toggle="modal" data-bs-target="#receiver-detail" onclick="getReceiverDetails(' + d['id'] + ')">';
row += '<div class="row align-items-center flex-row">';
row += '<div class="col-1 col-sm-4"><span class="d-block text-1">' + d['name'] + '</span> <span class="text-muted">' + d['mobile'] + '</span></div>';
row += '<div class="col-2 col-sm-2"><span class="d-block text-1"><a href="/Transaction/SendMoney">Send Transaction</a></span></div>';
@ -295,12 +358,12 @@
}
function PopulateTransactionData(response) {
debugger
var result = response.customerTransaction;
var Id = response.customerTransaction.Id;
if (response.responseCode == 0) {
let row = '';
$.each(result, function (i, d) {
row += '<div class="transaction-item px-4 py-3" data-bs-toggle="modal" data-bs-target="#transaction-detail">';
row += '<div class="transaction-item px-4 py-3" data-bs-toggle="modal" data-bs-target="#transaction-detail" onclick="getData(' + d['id'] + ')">';
row += '<div class="row align-items-center flex-row">';
row += '<div class="col-2 col-sm-2 text-center"> <span class="d-block text-1 fw-300">' + d['transactionDay'] + '</span> <span class="d-block text-1 fw-300 text-uppercase">' + d['transactionMonth'] + '</span> </div>';
row += '<div class="col-3 col-sm-4"> <span class="d-block text-1">' + d['pBankName'] + '</span> <span class="text-muted">' + d['paymentMethod'] + '</span> </div>';
@ -323,5 +386,80 @@
$('#transactionListDiv').hide();
}
}
function getData(id) {
debugger;
$.ajax({
type: 'GET',
contentType: 'application/json; charset=utf-8',
url: '/Home/GetTranDetail/' + id,
success: function (response) {
debugger;
var data = response.customerTransaction[0];
$('#hpBankName').text(data.pBankName);
$('#hpAmt').text(data.acAmt);
$('#hDate').text(data.transactionDay);
$('#payAmt').find('span').text(data.cAmt);
$('#serviceCharge').find('span').text(data.serviceCharge);
$('#tAmt').find('span').text(data.acAmt);
$('#tAmtNpr').find('span').text(data.amount);
$('#pBankName').next().text(data.pBankName);
$('#pCountry').next().text(data.pCountry);
$('#tranId').next().text(data.id);
$('#paymentMethod').next().text(data.paymentMethod);
$('#status').next().text(data.status);
// var statusIcon = '<i class="fas fa-check-circle"></i>';
// if (data.Status.toLowerCase() === 'cancel') {
// statusIcon = '<i class="fas fa-times-circle"></i>';
// } else if (data.Status.toLowerCase() === 'processing') {
// statusIcon = '<i class="fas fa-ellipsis-h"></i>';
// }
// $('#status').html(statusIcon + ' ' + data.Status);
},
error: function (error) {
console.error(error);
}
});
}
function getReceiverDetails(id) {
debugger
$.ajax({
type: 'GET',
contentType: 'application/json; charset=utf-8',
url: '/Home/GetReceiverDetail/' + id,
success: function (response) {
debugger
if (response.receiverModel && response.receiverModel.length > 0) {
var data = response.receiverModel[0];
$('#tranStatus').text(data.tranStatus);
$('#nprAMt').text(data.nprAmt);
$('#receiverName').text(data.name);
$('#txnId').find('span').text(data.Id);
$('#recName').find('span').text(data.name);
$('#recAddress').find('span').text(data.address);
$('#recMobile').find('span').text(data.mobile);
$('#collAmt').find('span').text(data.collAmt);
$('#serviceFee').find('span').text(data.serviceCharge);
$('#rewardsPoints').find('span').text(data.customerPremium);
$('#tAmt').find('span').text(data.sentAmt);
$('#exRate').find('span').text(data.exRate);
$('#nprPayAmt').find('span').text(data.payoutAmt);
$('#payoutAgent').find('span').text(data.pAgent);
}
},
error: function (error) {
console.error(error);
}
});
}
</script>
}

32
CustomerOnlineV2/CustomerOnlineV2/Views/Transaction/Payment.cshtml

@ -4,10 +4,39 @@
<head>
<style>
.loader {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url('/images/loading.gif') 50% 50% no-repeat rgb(249,249,249);
}
</style>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script>
$(document).ready(function () {
//Id of your button control either it is server control or simple html control
$(".loader").fadeOut("slow");
$("[id*='btn_submit']").click();
});
</script>
</head>
<body>
<div class="loader"></div>
<form id="Customer-form" method="post" action="https://payments.securetrading.net/process/payments/choice">
<input asp-for="sitereference" name="sitereference" type="hidden" />
<input asp-for="stprofile" name="stprofile" value="default" type="hidden" />
@ -43,7 +72,8 @@
<input asp-for="sitesecurity" name="sitesecurity" type="hidden" />
<input asp-for="merchantemail" name="merchantemail" value="shakun@japanremit.com" type="hidden" />
<input type="submit" id="btn_submit" />
@Html.AntiForgeryToken()
<input type="submit" id="btn_submit" style="display:none;" />
</form>
@* <form method="POST" action="https://payments.securetrading.net/process/payments/choice">
<input type="hidden" name="version" value="2">

4
CustomerOnlineV2/CustomerOnlineV2/wwwroot/css/styles-login.css

@ -214,7 +214,7 @@ h1, h2, h3, h4, h5, h6 {
.text-8 {
font-size: 32px !important;
font-size: 2rem !important;
font-size: 1rem !important;
}
.text-9 {
@ -293,7 +293,7 @@ h1, h2, h3, h4, h5, h6 {
@media (min-width: 1200px) {
.text-17 {
font-size: 4.5rem !important;
font-size: 1rem !important;
}
}

Loading…
Cancel
Save