Browse Source

Code refractor

master
arjundhami123 7 months ago
parent
commit
468070b027
  1. BIN
      RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.metadata.v7.bin
  2. BIN
      RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.projects.v7.bin
  3. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/0a1d5d1c-6da5-49aa-8f07-839714b32826.vsidx
  4. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/29d4f8ab-6116-478f-9966-29aba2034a88.vsidx
  5. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/5b89f416-0056-4461-95c5-8870b7d19b8d.vsidx
  6. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/v17/.futdcache.v2
  7. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/v17/.suo
  8. 1
      RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/IRemitBusiness.cs
  9. 54
      RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/RemitBusiness.cs
  10. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.dll
  11. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.pdb
  12. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  13. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  14. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  15. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  16. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfo.cs
  17. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfoInputs.cache
  18. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.csproj.AssemblyReference.cache
  19. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.csproj.CoreCompileInputs.cache
  20. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.dll
  21. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.pdb
  22. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/ref/RemitInboundAPI.Business.dll
  23. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/refint/RemitInboundAPI.Business.dll
  24. 11
      RemitInboundAPI/RemitInboundAPI.Common/Model/RemitModel/ExRateModel.cs
  25. BIN
      RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  26. BIN
      RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  27. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfo.cs
  28. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfoInputs.cache
  29. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.dll
  30. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.pdb
  31. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/ref/RemitInboundAPI.Common.dll
  32. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/refint/RemitInboundAPI.Common.dll
  33. 13
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/ApplicationRepository/ApplicationRepository.cs
  34. 1
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/IRemitRepository.cs
  35. 56
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/RemitRepository.cs
  36. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  37. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  38. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  39. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  40. 2
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfo.cs
  41. 2
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfoInputs.cache
  42. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.csproj.AssemblyReference.cache
  43. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.dll
  44. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.pdb
  45. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/ref/RemitInboundAPI.Repository.dll
  46. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/refint/RemitInboundAPI.Repository.dll
  47. 26
      RemitInboundAPI/RemitInboundAPI/Controllers/RemitController.cs
  48. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.dll
  49. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.pdb
  50. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  51. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  52. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  53. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  54. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.dll
  55. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.exe
  56. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.pdb
  57. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfo.cs
  58. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfoInputs.cache
  59. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.csproj.AssemblyReference.cache
  60. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.dll
  61. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.pdb
  62. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/apphost.exe
  63. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/ref/RemitInboundAPI.dll
  64. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/refint/RemitInboundAPI.dll
  65. BIN
      TestAppRemitInbound/.vs/TestAppRemitInbound/v17/.suo

BIN
RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.metadata.v7.bin

BIN
RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.projects.v7.bin

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/0a1d5d1c-6da5-49aa-8f07-839714b32826.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/29d4f8ab-6116-478f-9966-29aba2034a88.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/5b89f416-0056-4461-95c5-8870b7d19b8d.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/v17/.futdcache.v2

BIN
RemitInboundAPI/.vs/RemitInboundAPI/v17/.suo

1
RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/IRemitBusiness.cs

@ -7,5 +7,6 @@ namespace RemitInboundAPI.Business.Business.RemitBusiness
public interface IRemitBusiness
{
Task<CommonResponse> CalculateExRate(ExRateModel model, UserLoginModel loginDetails);
Task<CommonResponse> SendRemittance(SendRemittanceModel model, UserLoginModel loginDetails);
}
}

54
RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/RemitBusiness.cs

@ -6,6 +6,7 @@ using Newtonsoft.Json;
using RemitInboundAPI.Common.Model.ApplicationModel;
using RemitInboundAPI.Common.Helper;
using RemitInboundAPI.Repository.Repository.ApplicationRepository;
using RemitInboundAPI.Business.Helper.ValidationHelper;
namespace RemitInboundAPI.Business.Business.RemitBusiness
{
@ -25,55 +26,58 @@ namespace RemitInboundAPI.Business.Business.RemitBusiness
public async Task<CommonResponse> CalculateExRate(ExRateModel model, UserLoginModel loginDetails)
{
CommonResponse _response;
ExRateValidationHelper validationHelper = new ExRateValidationHelper();
var _logRequestModel = new InboundLogModel(model.SessionIdentifier, model.ProcessIdentifier, loginDetails.UserName, "CalculateExRate", model.IpAddress, model.PartnerSessionId, JsonConvert.SerializeObject(model));
var _logResponse = await _applicationRepo.LogInboundData(_logRequestModel);
if (_logResponse.ResponseCode == ResponseHelper.SUCCESS)
{
if (string.IsNullOrEmpty(model.SendingCountryCode))
_response = await validationHelper.ValidateExrateRequest(model);
if (_response.ResponseCode == ResponseHelper.SUCCESS)
{
_response = new CommonResponse(ResponseHelper.FAILED, "SendingCountryCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
_response = await _remitRepo.CalculateExRate(model, loginDetails);
}
else if (string.IsNullOrEmpty(model.SendingCurrencyCode))
else
{
_response = new CommonResponse(ResponseHelper.FAILED, "SendingCurrencyCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
else if (string.IsNullOrEmpty(model.PayoutCountryCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutCountryCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
_applicationRepo.LogUpdateInboundData(_response, _logResponse.Id);
}
else if (string.IsNullOrEmpty(model.PayoutCurrencyCode))
else
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutCurrencyCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
_response = new CommonResponse(ResponseHelper.FAILED, "Error occured in application, please contact Administrator.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | LOGGING ERROR | " + JsonConvert.SerializeObject(new CommonResponse(ResponseHelper.FAILED, "Error logging Inbound master log.")));
}
else if (string.IsNullOrEmpty(model.CollectionAmount))
{
_response = new CommonResponse(ResponseHelper.FAILED, "CollectionAmount can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
return _response;
}
else if (string.IsNullOrEmpty(model.PayoutAmount))
public async Task<CommonResponse> SendRemittance(SendRemittanceModel model, UserLoginModel loginDetails)
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutAmount can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
else if (string.IsNullOrEmpty(model.PaymentTypeCode))
CommonResponse _response;
SendTransactionValidationHelper validationHelper = new SendTransactionValidationHelper();
var _logRequestModel = new InboundLogModel(model.SessionIdentifier, model.ProcessIdentifier, loginDetails.UserName, "SendRemittance", model.IpAddress, model.PartnerSessionId, JsonConvert.SerializeObject(model));
var _logResponse = await _applicationRepo.LogInboundData(_logRequestModel);
if (_logResponse.ResponseCode == ResponseHelper.SUCCESS)
{
_response = new CommonResponse(ResponseHelper.FAILED, "PaymentTypeCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
_response = await validationHelper.SendTransactionValidationRequest(model);
if (_response.ResponseCode == ResponseHelper.SUCCESS)
{
_response = await _remitRepo.SendRemittance(model, loginDetails);
}
else
_response = await _remitRepo.CalculateExRate(model, loginDetails);
{
_logger.LogError("REMITBUSINESS | SENDREMITTANCE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
_applicationRepo.LogUpdateInboundData(_response, _logResponse.Id);
}
else
{
_response = new CommonResponse(ResponseHelper.FAILED, "Error occured in application, please contact Administrator.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | LOGGING ERROR | " + JsonConvert.SerializeObject(new CommonResponse(ResponseHelper.FAILED, "Error logging Inbound master log.")));
_logger.LogError("REMITBUSINESS | SENDREMITTANCE | LOGGING ERROR | " + JsonConvert.SerializeObject(new CommonResponse(ResponseHelper.FAILED, "Error logging Inbound master log.")));
}
return _response;

BIN
RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.dll

BIN
RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.pdb

BIN
RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.pdb

BIN
RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.dll

BIN
RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb

2
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfo.cs

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("RemitInboundAPI.Business")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d0e19cf53e66ba0a5a9c6b239de285e7dc607705")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyProductAttribute("RemitInboundAPI.Business")]
[assembly: System.Reflection.AssemblyTitleAttribute("RemitInboundAPI.Business")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

2
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfoInputs.cache

@ -1 +1 @@
41c46ebdfcc482de5d20101542195e4616cdd7d459c9d5667c9d9d30bdc797ec
004d09ff2fec517313ded0a3d9908b4367c0d4de9d72f30c816a9ac109ba929a

BIN
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.csproj.AssemblyReference.cache

2
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.csproj.CoreCompileInputs.cache

@ -1 +1 @@
afa9fdb0368450c38d005475b191fd0a8a1e120382315b6e9dca0a9b514b2525
3acde09e1e93ad3ad06d19e21dc24a519aa0bab3e870f1fe9707b3d2e85b62a5

BIN
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.dll

BIN
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.pdb

BIN
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/ref/RemitInboundAPI.Business.dll

BIN
RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/refint/RemitInboundAPI.Business.dll

11
RemitInboundAPI/RemitInboundAPI.Common/Model/RemitModel/ExRateModel.cs

@ -12,4 +12,15 @@ namespace RemitInboundAPI.Common.Model.RemitModel
public string? PayoutAmount { get; set; }
public string? PaymentTypeCode { get; set; }
}
public class SendRemittanceModel : CommonRequestModel
{
public string? SendingCountryCode { get; set; }
public string? SendingCurrencyCode { get; set; }
public string? PayoutCountryCode { get; set; }
public string? PayoutCurrencyCode { get; set; }
public string? CollectionAmount { get; set; }
public string? PayoutAmount { get; set; }
public string? PaymentTypeCode { get; set; }
}
}

BIN
RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.pdb

2
RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfo.cs

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("RemitInboundAPI.Common")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9ad7ef8499d593f08bb13a035c06a42e1abe368d")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyProductAttribute("RemitInboundAPI.Common")]
[assembly: System.Reflection.AssemblyTitleAttribute("RemitInboundAPI.Common")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

2
RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfoInputs.cache

@ -1 +1 @@
75b3b37e505710e6cff3d6fd97a38a745494bf435fd176cf3ceadbe99fcb9eed
6fc89aa9fee68aff86786a88b08ba57abe5bbc76baf1169dc015508f13935d0f

BIN
RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.pdb

BIN
RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/ref/RemitInboundAPI.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/refint/RemitInboundAPI.Common.dll

13
RemitInboundAPI/RemitInboundAPI.Repository/Repository/ApplicationRepository/ApplicationRepository.cs

@ -4,7 +4,6 @@ using RemitInboundAPI.Common.Helper;
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Common.Model.ApplicationModel;
using RemitInboundAPI.Repository.DBHelper;
using System.Reflection;
namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
{
@ -38,7 +37,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
_logger.LogError("APPLICATIONREPOSITORY | AUTHENTICATEUSER | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
public async Task<CommonResponse> Authenticate(AuthenticateModel model)
@ -64,7 +63,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
_logger.LogError("APPLICATIONREPOSITORY | AUTHENTICATE | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
public async Task<CommonResponse> LogInboundData(InboundLogModel model)
@ -91,7 +90,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
_logger.LogError("APPLICATIONREPOSITORY | AUTHENTICATE | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
public async Task<CommonResponse> LogUpdateInboundData(CommonResponse response, string rowId)
@ -115,7 +114,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
_logger.LogError("APPLICATIONREPOSITORY | LOGUPDATEINBOUNDDATA | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
public async Task<PartnerAuthorizationKeys> GetPartnerAuthorizationKeys(string? agentId)
@ -145,7 +144,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
_logger.LogError("APPLICATIONREPOSITORY | GETPARTNERAUTHORIZATIONKEYS | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
public async Task<CommonResponse> CheckUserAuthentication(AuthenticateModel model)
@ -168,7 +167,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
_logger.LogError("APPLICATIONREPOSITORY | CHECKUSERAUTHENTICATION | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
}
}

1
RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/IRemitRepository.cs

@ -7,5 +7,6 @@ namespace RemitInboundAPI.Repository.Repository.RemitRepository
public interface IRemitRepository
{
Task<CommonResponse> CalculateExRate(ExRateModel model, UserLoginModel loginDetails);
Task<CommonResponse> SendRemittance(SendRemittanceModel model, UserLoginModel loginDetails);
}
}

56
RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/RemitRepository.cs

@ -70,7 +70,61 @@ namespace RemitInboundAPI.Repository.Repository.RemitRepository
_logger.LogError("REMITREPOSITORY | CALCULATEEXRATE | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
return _response;
}
public async Task<CommonResponse> SendRemittance(SendRemittanceModel model, UserLoginModel loginDetails)
{
var _response = new CommonResponse();
try
{
var sql = "EXEC PROC_REMIT_INBOUND_EXRATE @Flag = 'EXRATE'";
sql += ", @UserName= " + _connHelper.FilterString(loginDetails.UserName);
sql += ", @SendingCountryCode = " + _connHelper.FilterString(model.SendingCountryCode);
sql += ", @SendingCurrencyCode = " + _connHelper.FilterString(model.SendingCurrencyCode);
sql += ", @PayoutCountryCode = " + _connHelper.FilterString(model.PayoutCountryCode);
sql += ", @PayoutCurrencyCode = " + _connHelper.FilterString(model.PayoutCurrencyCode);
sql += ", @CollectionAmount = " + _connHelper.FilterString(model.CollectionAmount);
sql += ", @PayoutAmount = " + _connHelper.FilterString(model.PayoutAmount);
sql += ", @PaymentTypeCode = " + _connHelper.FilterString(model.PaymentTypeCode);
sql += ", @AgentId = " + _connHelper.FilterString(loginDetails.AgentId);
_logger.LogDebug("REMITREPOSITORY | SENDREMITTANCE | SQL | " + sql);
var dt = _connHelper.ExecuteDataTable(sql);
if (dt == null || dt.Rows.Count <= 0)
{
_response.ResponseCode = ResponseHelper.FAILED;
_response.ResponseMessage = ResponseMessageHelper.DBNULLERROR;
_logger.LogError("REMITREPOSITORY | SENDREMITTANCE | DBNULLERROR | " + JsonConvert.SerializeObject(_response));
}
else
{
_response = _connHelper.ParseDbResult(dt);
if (_response.ResponseCode == ResponseHelper.SUCCESS)
{
var exRateResponse = new
{
ServiceCharge = Utilities.ShowDecimal(Convert.ToString(dt.Rows[0]["ServiceCharge"])),
ExRate = Utilities.ShowDecimalRate(Convert.ToString(dt.Rows[0]["ExRate"])),
PayoutCurrencyCode = Convert.ToString(dt.Rows[0]["PayoutCurrencyCode"]),
CurrDecimal = Convert.ToString(dt.Rows[0]["CurrDecimal"]),
CollectionAmount = Utilities.ShowDecimal(Convert.ToString(dt.Rows[0]["CollectionAmount"])),
TransferAmount = Utilities.ShowDecimal(Convert.ToString(dt.Rows[0]["TransferAmount"])),
PayoutAmount = Utilities.ShowDecimal(Convert.ToString(dt.Rows[0]["PayoutAmount"]))
};
_response.Data = exRateResponse;
}
}
}
catch (Exception ex)
{
_response.ResponseCode = ResponseHelper.EXCEPTION;
_response.ResponseMessage = "Exception occured: " + ex.Message;
_logger.LogError("REMITREPOSITORY | SENDREMITTANCE | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return _response;
}
}
}

BIN
RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.pdb

BIN
RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.dll

BIN
RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb

2
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfo.cs

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("RemitInboundAPI.Repository")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d0e19cf53e66ba0a5a9c6b239de285e7dc607705")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyProductAttribute("RemitInboundAPI.Repository")]
[assembly: System.Reflection.AssemblyTitleAttribute("RemitInboundAPI.Repository")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

2
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfoInputs.cache

@ -1 +1 @@
bdca9c7e133229303ee868c37894d2543271dd3f35b2e8ed474a12f92a9ba860
3740fc0d5a2097830e00d03b0ca90af75716d2ab5f559a982fe0e42e6d89ae7e

BIN
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.csproj.AssemblyReference.cache

BIN
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.dll

BIN
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.pdb

BIN
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/ref/RemitInboundAPI.Repository.dll

BIN
RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/refint/RemitInboundAPI.Repository.dll

26
RemitInboundAPI/RemitInboundAPI/Controllers/RemitController.cs

@ -38,9 +38,31 @@ namespace RemitInboundAPI.Controllers
using (LogContext.PushProperty("ProcessIdentifier", model.ProcessIdentifier))
using (LogContext.PushProperty("SessionIdentifier", model.SessionIdentifier))
{
_logger.LogInformation($"APPLICATIONCONTROLLER | CALCULATEEXRATE | REQUEST | {JsonConvert.SerializeObject(model)}");
_logger.LogInformation($"REMITCONTROLLER | CALCULATEEXRATE | REQUEST | {JsonConvert.SerializeObject(model)}");
_response = await _remitBusiness.CalculateExRate(model, loginDetails);
_logger.LogInformation($"APPLICATIONCONTROLLER | CALCULATEEXRATE | RESPONSE | {JsonConvert.SerializeObject(_response)}");
_logger.LogInformation($"REMITCONTROLLER | CALCULATEEXRATE | RESPONSE | {JsonConvert.SerializeObject(_response)}");
}
return Ok(_response);
}
[HttpPost]
[Route("sendRemittance")]
[Authorize(AuthenticationSchemes = "ApplicationAuthorization")]
public async Task<IActionResult> SendRemittance(SendRemittanceModel model)
{
var _response = new CommonResponse();
var loginDetails = await AuthorizationHelper.GetLoginDetails(User);
model.SessionIdentifier = loginDetails.SessionIdentifier; //unique for one session
model.ProcessIdentifier = Convert.ToString(Guid.NewGuid()); //unique for each process
model.IpAddress = Utilities.GetIpAddress(HttpContext);
using (LogContext.PushProperty("PartnerSessionId", model.PartnerSessionId))
using (LogContext.PushProperty("ProcessIdentifier", model.ProcessIdentifier))
using (LogContext.PushProperty("SessionIdentifier", model.SessionIdentifier))
{
_logger.LogInformation($"REMITCONTROLLER | SENDREMITTANCE | REQUEST | {JsonConvert.SerializeObject(model)}");
_response = await _remitBusiness.SendRemittance(model, loginDetails);
_logger.LogInformation($"REMITCONTROLLER | SENDREMITTANCE | RESPONSE | {JsonConvert.SerializeObject(_response)}");
}
return Ok(_response);
}

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.pdb

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.pdb

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.exe

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.pdb

2
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfo.cs

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("RemitInboundAPI")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d0e19cf53e66ba0a5a9c6b239de285e7dc607705")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyProductAttribute("RemitInboundAPI")]
[assembly: System.Reflection.AssemblyTitleAttribute("RemitInboundAPI")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

2
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfoInputs.cache

@ -1 +1 @@
97d977980e2fca2aea32a281c3427350a7614ccd288eaa0a18c183775e5cce79
858d54920022ed67936a519aeee7aac2a5fa9ef0d5462e90c0ada0ec601a2464

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.csproj.AssemblyReference.cache

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.dll

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.pdb

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/apphost.exe

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/ref/RemitInboundAPI.dll

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/refint/RemitInboundAPI.dll

BIN
TestAppRemitInbound/.vs/TestAppRemitInbound/v17/.suo

Loading…
Cancel
Save