Browse Source

Code refractor

master
arjundhami123 7 months ago
parent
commit
93fa7e2a38
  1. 17
      DB/HelpQuery_CoreSys/Verify_Send_Txn.sql
  2. BIN
      RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.metadata.v7.bin
  3. BIN
      RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.projects.v7.bin
  4. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/DesignTimeBuild/.dtbcache.v2
  5. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/0166103e-c250-4416-9fc5-ad0d3ac54c66.vsidx
  6. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/228702ae-4b2b-4b86-a2ba-65d6df81d13d.vsidx
  7. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/265f0a30-589a-4dfc-b72f-c5970f334333.vsidx
  8. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/c18f29dc-7232-44f1-ab1e-c56ae01b2ae6.vsidx
  9. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/v17/.futdcache.v2
  10. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/v17/.suo
  11. 4
      RemitInboundAPI/RemitInboundAPI.Business/Business/ApplicationBusiness/ApplicationBusiness.cs
  12. 1
      RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/IRemitBusiness.cs
  13. 38
      RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/RemitBusiness.cs
  14. 47
      RemitInboundAPI/RemitInboundAPI.Business/Helper/ValidationHelper/ExRateValidationHelper.cs
  15. 27
      RemitInboundAPI/RemitInboundAPI.Business/Helper/ValidationHelper/SendTransactionValidationHelper.cs
  16. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.dll
  17. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.pdb
  18. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  19. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  20. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  21. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  22. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfo.cs
  23. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfoInputs.cache
  24. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.csproj.AssemblyReference.cache
  25. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.dll
  26. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.pdb
  27. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/ref/RemitInboundAPI.Business.dll
  28. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/refint/RemitInboundAPI.Business.dll
  29. 59
      RemitInboundAPI/RemitInboundAPI.Common/Model/RemitModel/ExRateModel.cs
  30. BIN
      RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  31. BIN
      RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  32. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfo.cs
  33. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfoInputs.cache
  34. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.dll
  35. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.pdb
  36. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/ref/RemitInboundAPI.Common.dll
  37. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/refint/RemitInboundAPI.Common.dll
  38. 1
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/IRemitRepository.cs
  39. 56
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/RemitRepository.cs
  40. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  41. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  42. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  43. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  44. 2
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfo.cs
  45. 2
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfoInputs.cache
  46. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.csproj.AssemblyReference.cache
  47. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.dll
  48. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.pdb
  49. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/ref/RemitInboundAPI.Repository.dll
  50. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/refint/RemitInboundAPI.Repository.dll
  51. 22
      RemitInboundAPI/RemitInboundAPI/Controllers/RemitController.cs
  52. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.dll
  53. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.pdb
  54. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  55. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  56. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  57. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  58. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.dll
  59. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.exe
  60. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.pdb
  61. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfo.cs
  62. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfoInputs.cache
  63. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.csproj.AssemblyReference.cache
  64. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.dll
  65. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.pdb
  66. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/apphost.exe
  67. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/ref/RemitInboundAPI.dll
  68. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/refint/RemitInboundAPI.dll
  69. BIN
      TestAppRemitInbound/.vs/TestAppRemitInbound/v17/.suo

17
DB/HelpQuery_CoreSys/Verify_Send_Txn.sql

@ -0,0 +1,17 @@
--validate transactions
EXEC proc_sendIRH @flag = 'v', @user = 'ajey', @agentRefId = '22744712-e941-4db6', @senderId = '73174', @sfName = 'ARJUN', @smName = 'SINGH', @slName = 'DHAMI', @slName2 = null
, @sIdType = 'Passport', @sIdNo = '21312312312', @sIdValid = '2028-12-07', @sdob = '1991-12-11', @sTel = null, @sMobile = '+8189789798', @sNaCountry = 'Nepal', @scity = 'KYOTO SHI NAKAGYO KU'
, @sPostCode = '6040833', @sAdd1 = 'KYOTO SHI NAKAGYO KU, SAKYOCHO - 左京町', @sAdd2 = null, @sEmail = 'arjundhami554@gmail.com', @smsSend = 'N', @sgender = 'Male', @memberCode = null
, @benId = '285716', @rfName = 'ARJUN', @rmName = 'NEPAL', @rlName = 'CASH', @rlName2 = null, @rIdType = 'Passport', @rIdNo = '32432432', @rIdValid = null, @rdob = null, @rTel = null
, @rMobile = '+9779848700321', @rNaCountry = null, @rcity = null, @rPostCode = null, @rAdd1 = 'KTM', @rAdd2 = null, @rEmail = null, @raccountNo = null, @sCountryId = '113', @pCountry = 'NEPAL'
, @pCountryId = '151', @deliveryMethod = 'CASH PAYMENT', @deliveryMethodId = '1', @pBank = null, @pBankName = 'ANY WHERE', @pBankBranch = null, @pBankBranchName = null, @pAgent = null
, @pAgentName = null, @pBankType = 'E', @pCurr = 'NPR', @collCurr = 'JPY', @cAmt = '15000', @pAmt = '12905', @tAmt = '14500', @serviceCharge = '500', @discount = '0', @exRate = '0.89'
, @schemeCode = null, @couponTranNo = null, @purpose = 'Donation', @sourceOfFund = 'Business Income', @relationship = 'Brother/Sister', @occupation = '11405', @payMsg = null, @company = null
, @nCust = 'N', @enrollCust = 'N', @sBranch = '394390', @sAgent = '394390', @sSuperAgent = '393877', @settlingAgent = '394390', @isManualSc = 'Y', @collMode = 'Cash Collect', @manualSC = '500'
, @payoutPartner = '394397', @sCustStreet = 'SAKYOCHO - 左京町', @sCustLocation = '10283', @sCustomerType = '4700', @sCustBusinessType = null, @sCustIdIssuedCountry = null
, @sCustIdIssuedDate = '2023-01-01', @receiverId = '285716', @introducer = 'JME0009', @isAdditionalCDDI = 'N', @calcBy = 'cAmt', @additionalCDDIXml = '', @relationOther = null
, @purposeOther = null, @goodsType = null, @goodsOrigin = null, @portOfShipment = null, @calculatedOriginalSc = null

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

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

BIN
RemitInboundAPI/.vs/RemitInboundAPI/DesignTimeBuild/.dtbcache.v2

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/0166103e-c250-4416-9fc5-ad0d3ac54c66.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/228702ae-4b2b-4b86-a2ba-65d6df81d13d.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/265f0a30-589a-4dfc-b72f-c5970f334333.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/c18f29dc-7232-44f1-ab1e-c56ae01b2ae6.vsidx

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

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

4
RemitInboundAPI/RemitInboundAPI.Business/Business/ApplicationBusiness/ApplicationBusiness.cs

@ -82,8 +82,8 @@ namespace RemitInboundAPI.Business.Business.ApplicationBusiness
}
else
{
_response = new CommonResponse(ResponseHelper.FAILED, "Error occured in application, please contact Administrator.");
_logger.LogError("APPLICATIONBUSINESS | AUTHENTICATE | LOGGING ERROR | " + JsonConvert.SerializeObject(new CommonResponse(ResponseHelper.FAILED, "Error logging Inbound master log.")));
_response = new CommonResponse(ResponseHelper.FAILED, _logResponse.ResponseMessage);
_logger.LogError("REMITBUSINESS | SENDREMITTANCE | LOGGING ERROR | " + JsonConvert.SerializeObject(_response));
}
return _response;

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

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

38
RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/RemitBusiness.cs

@ -46,8 +46,38 @@ namespace RemitInboundAPI.Business.Business.RemitBusiness
}
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.")));
_response = new CommonResponse(ResponseHelper.FAILED, _logResponse.ResponseMessage);
_logger.LogError("REMITBUSINESS | SENDREMITTANCE | LOGGING ERROR | " + JsonConvert.SerializeObject(_response));
}
return _response;
}
public async Task<CommonResponse> VerifyRemittance(SendRemittanceModel model, UserLoginModel loginDetails)
{
CommonResponse _response;
SendTransactionValidationHelper validationHelper = new SendTransactionValidationHelper();
var _logRequestModel = new InboundLogModel(model.SessionIdentifier, model.ProcessIdentifier, loginDetails.UserName, "VerifyRemittance", model.IpAddress, model.PartnerSessionId, JsonConvert.SerializeObject(model));
var _logResponse = await _applicationRepo.LogInboundData(_logRequestModel);
if (_logResponse.ResponseCode == ResponseHelper.SUCCESS)
{
_response = await validationHelper.SendTransactionValidationRequest(model);
if (_response.ResponseCode == ResponseHelper.SUCCESS)
{
_response = await _remitRepo.VerifyRemittance(model, loginDetails);
}
else
{
_logger.LogError("REMITBUSINESS | VERIFYREMITTANCE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
_applicationRepo.LogUpdateInboundData(_response, _logResponse.Id);
}
else
{
_response = new CommonResponse(ResponseHelper.FAILED, _logResponse.ResponseMessage);
_logger.LogError("REMITBUSINESS | VERIFYREMITTANCE | LOGGING ERROR | " + JsonConvert.SerializeObject(_response));
}
return _response;
@ -76,8 +106,8 @@ namespace RemitInboundAPI.Business.Business.RemitBusiness
}
else
{
_response = new CommonResponse(ResponseHelper.FAILED, "Error occured in application, please contact Administrator.");
_logger.LogError("REMITBUSINESS | SENDREMITTANCE | LOGGING ERROR | " + JsonConvert.SerializeObject(new CommonResponse(ResponseHelper.FAILED, "Error logging Inbound master log.")));
_response = new CommonResponse(ResponseHelper.FAILED, _logResponse.ResponseMessage);
_logger.LogError("REMITBUSINESS | SENDREMITTANCE | LOGGING ERROR | " + JsonConvert.SerializeObject(_response));
}
return _response;

47
RemitInboundAPI/RemitInboundAPI.Business/Helper/ValidationHelper/ExRateValidationHelper.cs

@ -0,0 +1,47 @@
using RemitInboundAPI.Common.Helper;
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Common.Model.RemitModel;
namespace RemitInboundAPI.Business.Helper.ValidationHelper
{
public class ExRateValidationHelper
{
public async Task<CommonResponse> ValidateExrateRequest(ExRateModel model)
{
CommonResponse _response;
if (string.IsNullOrEmpty(model.SendingCountryCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "SendingCountryCode can not be empty.");
}
else if (string.IsNullOrEmpty(model.SendingCurrencyCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "SendingCurrencyCode can not be empty.");
}
else if (string.IsNullOrEmpty(model.PayoutCountryCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutCountryCode can not be empty.");
}
else if (string.IsNullOrEmpty(model.PayoutCurrencyCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutCurrencyCode can not be empty.");
}
else if (string.IsNullOrEmpty(model.CollectionAmount))
{
_response = new CommonResponse(ResponseHelper.FAILED, "CollectionAmount can not be empty.");
}
else if (string.IsNullOrEmpty(model.PayoutAmount))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutAmount can not be empty.");
}
else if (string.IsNullOrEmpty(model.PayoutTypeCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PaymentTypeCode can not be empty.");
}
else
{
_response = new CommonResponse(ResponseHelper.SUCCESS, ResponseMessageHelper.SUCCESS);
}
return _response;
}
}
}

27
RemitInboundAPI/RemitInboundAPI.Business/Helper/ValidationHelper/SendTransactionValidationHelper.cs

@ -0,0 +1,27 @@
using RemitInboundAPI.Common.Model.RemitModel;
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Common.Helper;
namespace RemitInboundAPI.Business.Helper.ValidationHelper
{
public class SendTransactionValidationHelper
{
public async Task<CommonResponse> SendTransactionValidationRequest(SendRemittanceModel model)
{
CommonResponse _response;
if (string.IsNullOrEmpty(model.RemittanceDetails.SendingCountryCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "SendingCountryCode can not be empty.");
}
else if (string.IsNullOrEmpty(model.RemittanceDetails.SendingCurrencyCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "SendingCurrencyCode can not be empty.");
}
else
{
_response = new CommonResponse(ResponseHelper.SUCCESS, ResponseMessageHelper.SUCCESS);
}
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+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+468070b0272aec26412cfadca89af6528befaca5")]
[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 @@
004d09ff2fec517313ded0a3d9908b4367c0d4de9d72f30c816a9ac109ba929a
2a495098a92895eea43493b50cf60c51d34487b7eabcf10eb8fcbbaafacf61e2

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

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

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

@ -10,17 +10,70 @@ namespace RemitInboundAPI.Common.Model.RemitModel
public string? PayoutCurrencyCode { get; set; }
public string? CollectionAmount { get; set; }
public string? PayoutAmount { get; set; }
public string? PaymentTypeCode { get; set; }
public string? PayoutTypeCode { get; set; }
}
public class SendRemittanceModel : CommonRequestModel
{
public RemitSenderDetailsModel? RemitSenderDetails { get; set; }
public RemitReceiverDetailsModel? RemitReceiverDetails { get; set; }
public RemittanceDetailsModel? RemittanceDetails { get; set; }
public string? PartnerTransactionId { get; set; }
}
public class RemittanceDetailsModel
{
public string? SendingCountryCode { get; set; }
public string? SendingCurrencyCode { get; set; }
public string? PayoutCountryCode { get; set; }
public string? PayoutTypeCode { get; set; }
public string? PayoutBankCode { get; set; }
public string? PayoutBankBranchCode { get; set; }
public string? PayoutCurrencyCode { get; set; }
public string? SendingCurrencyCode { get; set; }
public string? CollectionAmount { get; set; }
public string? TransferAmount { get; set; }
public string? PayoutAmount { get; set; }
public string? PaymentTypeCode { get; set; }
public string? ServiceCharge { get; set; }
public string? ExchangeRate { get; set; }
public string? RemittancePurpose { get; set; }
public string? SourceOfFund { get; set; }
public string? Relationship { get; set; }
public string? Occupation { get; set; }
}
public class RemitSenderDetailsModel
{
public string? SenderFirstName { get; set; }
public string? SenderMiddleName { get; set; }
public string? SenderLastName { get; set; }
public string? SenderIdType { get; set; }//need to provide codes to partner
public string? SenderIdNo { get; set; }
public string? SenderIdIssued { get; set; }
public string? SenderIdValid { get; set; }//optional
public string? SenderTelephone { get; set; }//optional
public string? SenderMobile { get; set; }
public string? SenderNativeCountry { get; set; }
public string? SenderCity { get; set; }
public string? SenderAddress { get; set; }
public string? SenderZipCode { get; set; }//optional
public string? SedenrEmail { get; set; }
public string? SedenrGender { get; set; }
}
public class RemitReceiverDetailsModel
{
public string? ReceiverFirstName { get; set; }
public string? ReceiverMiddleName { get; set; }
public string? ReceiverLastName { get; set; }
public string? ReceiverIdType { get; set; }//need to provide codes to partner
public string? ReceiverIdNo { get; set; }
public string? ReceiverIdIssued { get; set; }
public string? ReceiverIdValid { get; set; }//optional
public string? ReceiverMobile { get; set; }
public string? ReceiverCity { get; set; }
public string? ReceiverAddress { get; set; }
public string? ReceiverZipCode { get; set; }
public string? ReceiverEmail { 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+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+468070b0272aec26412cfadca89af6528befaca5")]
[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 @@
6fc89aa9fee68aff86786a88b08ba57abe5bbc76baf1169dc015508f13935d0f
f411a18d7f943f694ac9dc27941de6d2c2bc0b5e395f635dcd615a92cf5eb024

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

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

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

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

@ -32,7 +32,7 @@ namespace RemitInboundAPI.Repository.Repository.RemitRepository
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 += ", @PaymentTypeCode = " + _connHelper.FilterString(model.PayoutTypeCode);
sql += ", @AgentId = " + _connHelper.FilterString(loginDetails.AgentId);
_logger.LogDebug("REMITREPOSITORY | CALCULATEEXRATE | SQL | " + sql);
@ -73,6 +73,53 @@ namespace RemitInboundAPI.Repository.Repository.RemitRepository
return _response;
}
public async Task<CommonResponse> VerifyRemittance(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 += ", @AgentId = " + _connHelper.FilterString(loginDetails.AgentId);
_logger.LogDebug("REMITREPOSITORY | VERIFYREMITTANCE | 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 | VERIFYREMITTANCE | 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 | VERIFYREMITTANCE | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return _response;
}
public async Task<CommonResponse> SendRemittance(SendRemittanceModel model, UserLoginModel loginDetails)
{
var _response = new CommonResponse();
@ -80,13 +127,6 @@ namespace RemitInboundAPI.Repository.Repository.RemitRepository
{
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);

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+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+468070b0272aec26412cfadca89af6528befaca5")]
[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 @@
3740fc0d5a2097830e00d03b0ca90af75716d2ab5f559a982fe0e42e6d89ae7e
7f8c5a9d478398b849e6cffb41423c75129f0fd4a9fe8299aeb47875f23f7f23

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

22
RemitInboundAPI/RemitInboundAPI/Controllers/RemitController.cs

@ -45,6 +45,28 @@ namespace RemitInboundAPI.Controllers
return Ok(_response);
}
[HttpPost]
[Route("verifyRemittance")]
[Authorize(AuthenticationSchemes = "ApplicationAuthorization")]
public async Task<IActionResult> VerifyRemittance(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 | VERIFYREMITTANCE | REQUEST | {JsonConvert.SerializeObject(model)}");
_response = await _remitBusiness.VerifyRemittance(model, loginDetails);
_logger.LogInformation($"REMITCONTROLLER | VERIFYREMITTANCE | RESPONSE | {JsonConvert.SerializeObject(_response)}");
}
return Ok(_response);
}
[HttpPost]
[Route("sendRemittance")]
[Authorize(AuthenticationSchemes = "ApplicationAuthorization")]

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+0ed8148940d4d7c9591dee5f210ff03f8ff4b3d5")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+468070b0272aec26412cfadca89af6528befaca5")]
[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 @@
858d54920022ed67936a519aeee7aac2a5fa9ef0d5462e90c0ada0ec601a2464
0fe3b272f1562e7bdfdedd6ccf120c666a06b77c5a53f3d25ce6b708d2e5ff58

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