Browse Source

Ex rate code added, authenticate logic added

master
arjundhami123 8 months ago
parent
commit
c2a210b942
  1. 238
      DB/SP's/PROC_REMIT_INBOUND_EXRATE.sql
  2. 18
      DB/SP's/PROC_REMIT_INBOUND_LOGIN.sql
  3. 5
      DB/SP's/PROC_REMIT_INBOUND_LOGS.sql
  4. 1
      DB/Tables/Log_Session_Tables.sql
  5. BIN
      RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.metadata.v7.bin
  6. BIN
      RemitInboundAPI/.vs/ProjectEvaluation/remitinboundapi.projects.v7.bin
  7. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/DesignTimeBuild/.dtbcache.v2
  8. 0
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/0a1d5d1c-6da5-49aa-8f07-839714b32826.vsidx
  9. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/13895d19-bef1-44c2-ab27-f50f64c291ed.vsidx
  10. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/29d4f8ab-6116-478f-9966-29aba2034a88.vsidx
  11. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/4525c134-3ac3-43ac-8dd7-b824d72652dc.vsidx
  12. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/5743ec28-85e2-4504-ba22-2ca830546c38.vsidx
  13. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/5b89f416-0056-4461-95c5-8870b7d19b8d.vsidx
  14. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/7df2b2bb-8b73-47d3-ab51-afe2dc8c1ba5.vsidx
  15. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/9d388c7b-f825-47ce-9b03-48eb35e66af0.vsidx
  16. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/e2b57e68-8153-4c5b-b890-d8efcc7773b9.vsidx
  17. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/v17/.futdcache.v2
  18. BIN
      RemitInboundAPI/.vs/RemitInboundAPI/v17/.suo
  19. 7
      RemitInboundAPI/RemitInboundAPI.Business/Business/ApplicationBusiness/ApplicationBusiness.cs
  20. 1
      RemitInboundAPI/RemitInboundAPI.Business/Business/ApplicationBusiness/IApplicationBusiness.cs
  21. 7
      RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/IRemitBusiness.cs
  22. 66
      RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/RemitBusiness.cs
  23. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.dll
  24. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Business.pdb
  25. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  26. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  27. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  28. BIN
      RemitInboundAPI/RemitInboundAPI.Business/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  29. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfo.cs
  30. 2
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.AssemblyInfoInputs.cache
  31. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.csproj.AssemblyReference.cache
  32. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.dll
  33. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/RemitInboundAPI.Business.pdb
  34. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/ref/RemitInboundAPI.Business.dll
  35. BIN
      RemitInboundAPI/RemitInboundAPI.Business/obj/Debug/net8.0/refint/RemitInboundAPI.Business.dll
  36. 16
      RemitInboundAPI/RemitInboundAPI.Common/Helper/Utilities.cs
  37. 18
      RemitInboundAPI/RemitInboundAPI.Common/Model/ApplicationModel/AuthenticateModel.cs
  38. 15
      RemitInboundAPI/RemitInboundAPI.Common/Model/RemitModel/ExRateModel.cs
  39. BIN
      RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  40. BIN
      RemitInboundAPI/RemitInboundAPI.Common/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  41. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfo.cs
  42. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.AssemblyInfoInputs.cache
  43. 2
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.csproj.CoreCompileInputs.cache
  44. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.dll
  45. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/RemitInboundAPI.Common.pdb
  46. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/ref/RemitInboundAPI.Common.dll
  47. BIN
      RemitInboundAPI/RemitInboundAPI.Common/obj/Debug/net8.0/refint/RemitInboundAPI.Common.dll
  48. 35
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/ApplicationRepository/ApplicationRepository.cs
  49. 1
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/ApplicationRepository/IApplicationRepository.cs
  50. 8
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/IRemitRepository.cs
  51. 58
      RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/RemitRepository.cs
  52. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  53. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  54. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  55. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  56. 2
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfo.cs
  57. 2
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.AssemblyInfoInputs.cache
  58. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.csproj.AssemblyReference.cache
  59. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.dll
  60. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/RemitInboundAPI.Repository.pdb
  61. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/ref/RemitInboundAPI.Repository.dll
  62. BIN
      RemitInboundAPI/RemitInboundAPI.Repository/obj/Debug/net8.0/refint/RemitInboundAPI.Repository.dll
  63. 177
      RemitInboundAPI/RemitInboundAPI/Authorization/AuthorizationAttribute.cs
  64. 30
      RemitInboundAPI/RemitInboundAPI/Authorization/AuthorizationHelper.cs
  65. 7
      RemitInboundAPI/RemitInboundAPI/Controllers/ApplicationController.cs
  66. 27
      RemitInboundAPI/RemitInboundAPI/Controllers/RemitController.cs
  67. 3
      RemitInboundAPI/RemitInboundAPI/Program.cs
  68. 2
      RemitInboundAPI/RemitInboundAPI/RemitInboundAPI.csproj
  69. 3
      RemitInboundAPI/RemitInboundAPI/appsettings.json
  70. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/Microsoft.Win32.SystemEvents.dll
  71. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.dll
  72. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Business.pdb
  73. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.dll
  74. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Common.pdb
  75. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.dll
  76. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.Repository.pdb
  77. 200
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.deps.json
  78. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.dll
  79. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.exe
  80. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.pdb
  81. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Configuration.ConfigurationManager.dll
  82. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Drawing.Common.dll
  83. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Runtime.Caching.dll
  84. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Security.Cryptography.ProtectedData.dll
  85. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Security.Permissions.dll
  86. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Windows.Extensions.dll
  87. 3
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/appsettings.json
  88. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/unix/lib/net6.0/System.Drawing.Common.dll
  89. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll
  90. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/System.Drawing.Common.dll
  91. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll
  92. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/System.Windows.Extensions.dll
  93. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Runtime.Caching.dll
  94. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Windows.Extensions.dll
  95. BIN
      RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/netstandard2.0/System.Runtime.Caching.dll
  96. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfo.cs
  97. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.AssemblyInfoInputs.cache
  98. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.assets.cache
  99. BIN
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.csproj.AssemblyReference.cache
  100. 2
      RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.csproj.CoreCompileInputs.cache

238
DB/SP's/PROC_REMIT_INBOUND_EXRATE.sql

@ -0,0 +1,238 @@
ALTER PROC PROC_REMIT_INBOUND_EXRATE
(
@Flag VARCHAR(20)
, @SendingCountryCode VARCHAR(10) = NULL
, @UserName VARCHAR(80) = NULL
, @SendingCurrencyCode VARCHAR(10) = NULL
, @PayoutCountryCode VARCHAR(10) = NULL
, @PayoutCurrencyCode VARCHAR(10) = NULL
, @CollectionAmount MONEY = NULL
, @PayoutAmount MONEY = NULL
, @PaymentTypeCode VARCHAR(20) = NULL
, @AgentId INT = NULL
)
AS;
SET NOCOUNT ON;
SET XACT_ABORT ON;
BEGIN TRY
BEGIN
DECLARE @ErrorMsg VARCHAR(MAX) = NULL
IF @Flag = 'EXRATE'
BEGIN
DECLARE @PCountryId INT, @DeliveryMethodId INT, @PayoutPartner INT, @ExRateCalcByPartner BIT, @ScountryId INT
DECLARE @SSuperAgentId INT, @SAgentId INT = @AgentId, @PAgent INT
SELECT @PCountryId = countryId
FROM COUNTRYMASTER (NOLOCK)
WHERE countryCode = @PayoutCountryCode
IF ISNULL(@PCountryId, 0) = 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Invalid PayoutCountryCode, contact Head Office.', @Id = NULL;
RETURN;
END
SELECT @ScountryId = countryId
FROM COUNTRYMASTER (NOLOCK)
WHERE countryCode = @SendingCountryCode
IF ISNULL(@ScountryId, 0) = 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Invalid SendingCountryCode, contact Head Office.', @Id = NULL;
RETURN;
END
SELECT @DeliveryMethodId = serviceTypeId
FROM SERVICETYPEMASTER (NOLOCK)
WHERE serviceCode = @PaymentTypeCode
IF ISNULL(@DeliveryMethodId, 0) = 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Invalid PaymentTypeCode, contact Head Office.', @Id = NULL;
RETURN;
END
SELECT @PayoutPartner = AGENTID
,@ExRateCalcByPartner = ISNULL(exRateCalByPartner, 0)
FROM TblPartnerwiseCountry(NOLOCK)
WHERE CountryId = @PCountryId
AND IsActive = 1
AND ISNULL(PaymentMethod, @DeliveryMethodId) = @DeliveryMethodId
IF ISNULL(@PayoutPartner, 0) = 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Pyout partner not defined for selected Payout Country, contact Head Office.', @Id = NULL;
RETURN;
END
SELECT @PAgent = AGENTID
FROM AGENTMASTER(NOLOCK)
WHERE PARENTID = @PayoutPartner
AND ISNULL(ISSETTLINGAGENT, 'N') = 'Y';
DECLARE @PSuperAgent INT, @PSuperAgentName VARCHAR(150), @PAgentName VARCHAR(150), @PBranch INT, @PBranchName VARCHAR(150)
SELECT @PSuperAgent = sSuperAgent
,@PSuperAgentName = sSuperAgentName
,@PAgent = sAgent
,@PAgentName = sAgentName
,@PBranch = sBranch
,@PBranchName = sBranchName
FROM dbo.FNAGetBranchFullDetails(@PAGENT)
DECLARE @PCurrencyCode VARCHAR(10)
SELECT @PCurrencyCode = pCurrency
FROM dbo.exRateTreasury WITH (NOLOCK)
WHERE pCountry = @PCountryId
AND pAgent = @PAgent
IF @PCurrencyCode IS NULL
SELECT @PCurrencyCode = pCurrency
FROM dbo.exRateTreasury WITH (NOLOCK)
WHERE pCountry = @PCountryId
AND pAgent IS NULL
IF @PCurrencyCode IS NULL
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Currency not been defined yet for receiving country, contact Head Office.', @Id = NULL;
RETURN;
END
IF @PCurrencyCode <> @PayoutCurrencyCode
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Invalid PayoutCurrencyCode, contact Head Office.', @Id = NULL;
RETURN;
END
DECLARE @Place INT, @CurrDecimal INT
SELECT @Place = place
,@CurrDecimal = currDecimal
FROM currencyPayoutRound WITH (NOLOCK)
WHERE ISNULL(isDeleted, 'N') = 'N'
AND currency = @PCurrencyCode
AND ISNULL(tranType, @DeliveryMethodId) = @DeliveryMethodId
SET @currDecimal = ISNULL(@currDecimal, 0)
DECLARE @ExRate FLOAT
SELECT @ExRate = dbo.FNAGetCustomerRate(@ScountryId, @SAgentId, NULL, @SendingCurrencyCode, @pCountryId, @pAgent, @PayoutCurrencyCode, @DeliveryMethodId)
IF ISNULL(@ExRate, 0) = 0
BEGIN
SET @ErrorMsg = 'Exchange rate not defined yet for receiving currency (' + @PCurrencyCode + ')'
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = @ErrorMsg, @Id = NULL;
RETURN;
END
DECLARE @ServiceCharge MONEY, @SSuperAgent INT, @TransferAmount MONEY
SELECT @SSuperAgent = parentId
FROM agentMaster (NOLOCK)
WHERE agentId = @SAgentId
IF ISNULL(@CollectionAmount, 0) <> 0
BEGIN
SELECT @ServiceCharge = amount
FROM [dbo].FNAGetServiceCharge(@ScountryId, @SSuperAgent, @SAgentId, NULL, @PCountryId, @PSuperAgent, @PAgent, @PBranch, @DeliveryMethodId, @CollectionAmount, @SendingCurrencyCode)
IF ISNULL(@ServiceCharge, 0) = 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Service charge not defined yet for receiving country', @Id = NULL;
RETURN;
END
SET @TransferAmount = @CollectionAmount - @ServiceCharge
SET @PayoutAmount = @TransferAmount * @ExRate
SET @PayoutAmount = FLOOR(@PayoutAmount)
END
ELSE
BEGIN
SET @TransferAmount = CEILING(@PayoutAmount / (@ExRate))
SELECT @ServiceCharge = amount
FROM [dbo].FNAGetServiceCharge(@ScountryId, @SSuperAgent, @SAgentId, NULL, @PCountryId, @PSuperAgent, @PAgent, @PBranch, @DeliveryMethodId, @CollectionAmount, @SendingCurrencyCode)
IF ISNULL(@ServiceCharge, 0) = 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Service charge not defined yet for receiving country', @Id = NULL;
RETURN;
END
SET @CollectionAmount = @TransferAmount + @ServiceCharge
SET @CollectionAmount = CEILING(@CollectionAmount)
END
IF @CollectionAmount <= 0 OR @PayoutAmount <= 0 OR @TransferAmount <= 0
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = 'Invalid payout/transfer amount/collect amount found!', @Id = NULL;
RETURN;
END
DECLARE @ErrorCode VARCHAR(10)
EXEC PROC_CHECKCOUNTRYLIMIT @flag = 's-limit'
,@cAmt = @CollectionAmount
,@pAmt = @PayoutAmount
,@sCountryId = @sCountryId
,@collMode = NULL
,@deliveryMethod = @DeliveryMethodId
,@sendingCustType = NULL
,@pCountryId = @PCountryId
,@pCurr = @PayoutCurrencyCode
,@collCurr = @SendingCurrencyCode
,@pAgent = @PAgent
,@sAgent = @SAgentId
,@sBranch = NULL
,@msg = @ErrorMsg OUT
,@errorCode = @ErrorCode OUT
IF @ErrorCode <> '0'
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = @ErrorMsg, @Id = NULL;
RETURN;
END
EXEC PROC_CHECKCOUNTRYLIMIT @flag = 'r-limit'
,@cAmt = @CollectionAmount
,@pAmt = @PayoutAmount
,@sCountryId = @sCountryId
,@collMode = NULL
,@deliveryMethod = @DeliveryMethodId
,@sendingCustType = NULL
,@pCountryId = @PCountryId
,@pCurr = @PayoutCurrencyCode
,@collCurr = @SendingCurrencyCode
,@pAgent = @PAgent
,@sAgent = @SAgentId
,@sBranch = NULL
,@msg = @ErrorMsg OUT
,@errorCode = @ErrorCode OUT
IF @ErrorCode <> '0'
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = @ErrorMsg, @Id = NULL;
RETURN;
END
SELECT ErrorCode = 100
, ErrorMessage = 'Success'
, Id = NULL
, Extra = NULL
, ServiceCharge = @ServiceCharge
, ExRate = @ExRate
, Place = @Place
, PayoutCurrencyCode = @PayoutCurrencyCode
, CurrDecimal = @CurrDecimal
, CollectionAmount = @CollectionAmount
, TransferAmount = @TransferAmount
, PayoutAmount = @PayoutAmount
END
END
END TRY
BEGIN CATCH
IF @@TRANCOUNT>0
ROLLBACK TRANSACTION
SET @ErrorMsg = 'Exception executing SP: ' + ERROR_MESSAGE()
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 101, @ErrorMessage = @ErrorMsg, @Id = NULL;
END CATCH

18
DB/SP's/PROC_REMIT_INBOUND_LOGIN.sql

@ -2,17 +2,19 @@
ALTER PROC PROC_REMIT_INBOUND_LOGIN
(
@UserName VARCHAR(80)
, @Password VARCHAR(120)
, @AgentId INT
, @IpAddress VARCHAR(20)
, @SessionId VARCHAR(40)
, @ExpiresIn INT
@Flag VARCHAR(20)
, @UserName VARCHAR(80) = NULL
, @Password VARCHAR(120) = NULL
, @AgentId INT = NULL
, @IpAddress VARCHAR(20) = NULL
, @SessionId VARCHAR(40) = NULL
, @ExpiresIn INT = NULL
)
AS;
SET NOCOUNT ON;
SET XACT_ABORT ON;
BEGIN TRY
IF @Flag = 'LOGIN'
BEGIN
DECLARE @ErrorMsg VARCHAR(MAX) = NULL
DECLARE @UserId INT, @UserActive CHAR(1), @LoginPwd VARCHAR(120), @LoginUserAgtId INT, @EmpId INT, @IsLocked CHAR(1), @LoginTime DATETIME
@ -130,6 +132,10 @@ BEGIN TRY
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 100, @ErrorMessage = 'Success.', @Id = @userId, @Extra = @ProcessIdentifier;
END
ELSE IF @Flag = 'APPID'
BEGIN
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 100, @ErrorMessage = 'Success.', @Id = '1234567890abcdef', @Extra = 'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6';
END
END TRY
BEGIN CATCH
IF @@TRANCOUNT>0

5
DB/SP's/PROC_REMIT_INBOUND_LOGS.sql

@ -6,6 +6,7 @@ ALTER PROC PROC_REMIT_INBOUND_LOGS
, @SessionId VARCHAR(40) = NULL
, @RequestedBy VARCHAR(80) = NULL
, @MethodName VARCHAR(50) = NULL
, @IpAddress VARCHAR(20) = NULL
, @PartnerSessionId VARCHAR(40) = NULL
, @RequestJson NVARCHAR(MAX) = NULL
, @ResponseCode VARCHAR(5) = NULL
@ -20,8 +21,8 @@ BEGIN TRY
DECLARE @ErrorMsg VARCHAR(MAX) = NULL
IF @Flag = 'I-LOG'
BEGIN
INSERT INTO TBL_REMIT_INBOUND_LOG (SessionId, RequestedBy, RequestedDate, MethodName, PartnerSessionId, RequestJson)
SELECT @SessionId, @RequestedBy, GETDATE(), @MethodName, @PartnerSessionId, @RequestJson
INSERT INTO TBL_REMIT_INBOUND_LOG (SessionId, RequestedBy, RequestedDate, MethodName, PartnerSessionId, RequestJson, IpAddress)
SELECT @SessionId, @RequestedBy, GETDATE(), @MethodName, @PartnerSessionId, @RequestJson, @IpAddress
SET @RowId = @@IDENTITY;
EXEC SW_PROC_ERROR_HANDLER @ErrorCode = 100, @ErrorMessage = 'Success saving inbound log.', @Id = @RowId;

1
DB/Tables/Log_Session_Tables.sql

@ -8,6 +8,7 @@ CREATE TABLE TBL_REMIT_INBOUND_LOG
, RequestedBy VARCHAR(80) NOT NULL
, RequestedDate DATETIME DEFAULT(GETDATE()) NOT NULL
, MethodName VARCHAR(50) NOT NULL
, IpAddress VARCHAR(20) NOT NULL
, PartnerSessionId VARCHAR(40) NULL
, RequestJson NVARCHAR(MAX) NOT NULL
, ResponseCode VARCHAR(5) NULL

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

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

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

0
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/cc4a61e8-7648-43ac-a4bf-bb7dc6e1951b.vsidx → RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/0a1d5d1c-6da5-49aa-8f07-839714b32826.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/13895d19-bef1-44c2-ab27-f50f64c291ed.vsidx

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

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/4525c134-3ac3-43ac-8dd7-b824d72652dc.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/5743ec28-85e2-4504-ba22-2ca830546c38.vsidx

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

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/7df2b2bb-8b73-47d3-ab51-afe2dc8c1ba5.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/9d388c7b-f825-47ce-9b03-48eb35e66af0.vsidx

BIN
RemitInboundAPI/.vs/RemitInboundAPI/FileContentIndex/e2b57e68-8153-4c5b-b890-d8efcc7773b9.vsidx

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

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

7
RemitInboundAPI/RemitInboundAPI.Business/Business/ApplicationBusiness/ApplicationBusiness.cs

@ -23,10 +23,15 @@ namespace RemitInboundAPI.Business.Business.ApplicationBusiness
return await _applicationRepo.AuthenticateUser(model);
}
public async Task<PartnerAuthorizationKeys> GetPartnerAuthorizationKeys(string? agentId)
{
return await _applicationRepo.GetPartnerAuthorizationKeys(agentId);
}
public async Task<CommonResponse> Authenticate(AuthenticateModel model)
{
CommonResponse _response;
var _logRequestModel = new InboundLogModel(model.SessionId, model.UserName, "Authenticate", "", JsonConvert.SerializeObject(model));
var _logRequestModel = new InboundLogModel(model.SessionId, model.UserName, "Authenticate", model.IpAddress, "", JsonConvert.SerializeObject(model));
var _logResponse = await _applicationRepo.LogInboundData(_logRequestModel);
if (_logResponse.ResponseCode == ResponseHelper.SUCCESS)

1
RemitInboundAPI/RemitInboundAPI.Business/Business/ApplicationBusiness/IApplicationBusiness.cs

@ -7,5 +7,6 @@ namespace RemitInboundAPI.Business.Business.ApplicationBusiness
{
Task<CommonResponse> Authenticate(AuthenticateModel model);
Task<CommonResponse> AuthenticateUser(AuthenticateModel model);
Task<PartnerAuthorizationKeys> GetPartnerAuthorizationKeys(string? agentId);
}
}

7
RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/IRemitBusiness.cs

@ -1,6 +1,11 @@
namespace RemitInboundAPI.Business.Business.RemitBusiness
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Common.Model.ApplicationModel;
using RemitInboundAPI.Common.Model.RemitModel;
namespace RemitInboundAPI.Business.Business.RemitBusiness
{
public interface IRemitBusiness
{
Task<CommonResponse> CalculateExRate(ExRateModel model, UserLoginModel loginDetails);
}
}

66
RemitInboundAPI/RemitInboundAPI.Business/Business/RemitBusiness/RemitBusiness.cs

@ -1,4 +1,10 @@
using Microsoft.Extensions.Logging;
using RemitInboundAPI.Common.Model.RemitModel;
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Repository.Repository.RemitRepository;
using Newtonsoft.Json;
using RemitInboundAPI.Common.Model.ApplicationModel;
using RemitInboundAPI.Common.Helper;
using RemitInboundAPI.Repository.Repository.ApplicationRepository;
namespace RemitInboundAPI.Business.Business.RemitBusiness
@ -6,13 +12,71 @@ namespace RemitInboundAPI.Business.Business.RemitBusiness
public class RemitBusiness : IRemitBusiness
{
private readonly ILogger<RemitBusiness> _logger;
private readonly IRemitRepository _remitRepo;
private readonly IApplicationRepository _applicationRepo;
public RemitBusiness(ILogger<RemitBusiness> logger, IApplicationRepository applicationRepo)
public RemitBusiness(ILogger<RemitBusiness> logger, IRemitRepository remitRepo, IApplicationRepository applicationRepo)
{
_logger = logger;
_remitRepo = remitRepo;
_applicationRepo = applicationRepo;
}
public async Task<CommonResponse> CalculateExRate(ExRateModel model, UserLoginModel loginDetails)
{
CommonResponse _response;
var _logRequestModel = new InboundLogModel(model.SessionId, 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 = new CommonResponse(ResponseHelper.FAILED, "SendingCountryCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
else if (string.IsNullOrEmpty(model.SendingCurrencyCode))
{
_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));
}
else if (string.IsNullOrEmpty(model.PayoutCurrencyCode))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PayoutCurrencyCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
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));
}
else if (string.IsNullOrEmpty(model.PayoutAmount))
{
_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))
{
_response = new CommonResponse(ResponseHelper.FAILED, "PaymentTypeCode can not be empty.");
_logger.LogError("REMITBUSINESS | CALCULATEEXRATE | VALIDATION ERROR | " + JsonConvert.SerializeObject(_response));
}
else
_response = await _remitRepo.CalculateExRate(model, loginDetails);
_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.")));
}
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+57e8b53cd1628c96d2f4524d6b116d2b90aa6b40")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ad4414419d104eb84dc6a7d62146e8d7a5340be6")]
[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 @@
f0fcda2cb01cf5da651dc82fb38fe61d50509c66c9b10293d7cbc368af96c16e
786a4e94a5320199313f2fa51832bc93a967fa32b36524ada0064589963ffca2

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

16
RemitInboundAPI/RemitInboundAPI.Common/Helper/Utilities.cs

@ -60,5 +60,21 @@ namespace RemitInboundAPI.Common.Helper
var ipDetails = httpContext.Connection.RemoteIpAddress;
return ipDetails.ToString();
}
public static String ShowDecimal(String strVal)
{
if (strVal != "")
return String.Format("{0:0,0.00}", double.Parse(strVal));
else
return strVal;
}
public static String ShowDecimalRate(String strVal)
{
if (strVal != "")
return String.Format("{0:0,0.0000}", double.Parse(strVal));
else
return strVal;
}
}
}

18
RemitInboundAPI/RemitInboundAPI.Common/Model/ApplicationModel/AuthenticateModel.cs

@ -7,6 +7,20 @@
public string? Password { get; set; }
}
public class UserLoginModel : CommonRequestModel
{
public string? AgentId { get; set; }
public string? UserName { get; set; }
public string? ProcessIdentifier { get; set; }
}
public class PartnerAuthorizationKeys : CommonResponse
{
public string? AgentId { get; set; }
public string? APPId { get; set; }
public string? APISecretKey { get; set; }
}
public class CommonRequestModel
{
public string? SessionId { get; set; }
@ -19,16 +33,18 @@
public string? SessionId { get; set; }
public string? RequestedBy { get; set; }
public string? MethodName { get; set; }
public string? IpAddress { get; set; }
public string? PartnerSessionId { get; set; }
public string? RequestJson { get; set; }
public string? ResponseCode { get; set; }
public string? ResponseMessage { get; set; }
public InboundLogModel(string? sessionId, string? requestedBy, string? methodName, string? partnerSessionId, string? requestJson, string? responseCode = null, string? responseMessage = null)
public InboundLogModel(string? sessionId, string? requestedBy, string? methodName, string? ipAddress, string? partnerSessionId, string? requestJson, string? responseCode = null, string? responseMessage = null)
{
SessionId = sessionId;
RequestedBy = requestedBy;
MethodName = methodName;
IpAddress = ipAddress;
PartnerSessionId = partnerSessionId;
RequestJson = requestJson;
ResponseCode = responseCode;

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

@ -0,0 +1,15 @@
using RemitInboundAPI.Common.Model.ApplicationModel;
namespace RemitInboundAPI.Common.Model.RemitModel
{
public class ExRateModel : 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+57e8b53cd1628c96d2f4524d6b116d2b90aa6b40")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ad4414419d104eb84dc6a7d62146e8d7a5340be6")]
[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 @@
a3f2351d59ca7ef7e4b18436c38369e8abcc6c99db9cc9055714ed8f3f8e627f
ee3c83c4d90ed17a377281b316cc5388678448dbc4cdcefaef1efcb742da6302

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

@ -1 +1 @@
6cea524207c001df65fca79d1b9d32da9bf023b7e61c55a4986484827e3de705
227cf575c39014440863fa1ab49d0cbbcd13659a6ca200413142c37171359e83

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

35
RemitInboundAPI/RemitInboundAPI.Repository/Repository/ApplicationRepository/ApplicationRepository.cs

@ -46,8 +46,8 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
var _response = new CommonResponse();
try
{
var sql = "EXEC PROC_REMIT_INBOUND_LOGIN";
sql += " @UserName= " + _connHelper.FilterString(model.UserName);
var sql = "EXEC PROC_REMIT_INBOUND_LOGIN @Flag = 'LOGIN'";
sql += ", @UserName= " + _connHelper.FilterString(model.UserName);
sql += ", @Password = " + _connHelper.FilterString(model.Password);
sql += ", @AgentId = " + _connHelper.FilterString(model.AgentId);
sql += ", @SessionId = " + _connHelper.FilterString(model.SessionId);
@ -78,6 +78,7 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
sql += ", @MethodName= " + _connHelper.FilterString(model.MethodName);
sql += ", @PartnerSessionId = " + _connHelper.FilterString(model.PartnerSessionId);
sql += ", @RequestJson = " + _connHelper.FilterString(model.RequestJson);
sql += ", @IpAddress = " + _connHelper.FilterString(model.IpAddress);
_logger.LogDebug("APPLICATIONREPOSITORY | AUTHENTICATE | SQL | " + sql);
_response = _connHelper.ParseDbResult(sql);
@ -114,5 +115,35 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
}
return await Task.FromResult(_response);
}
public async Task<PartnerAuthorizationKeys> GetPartnerAuthorizationKeys(string? agentId)
{
var _response = new PartnerAuthorizationKeys();
try
{
var sql = "EXEC PROC_REMIT_INBOUND_LOGIN @Flag = 'APPID'";
sql += ", @AgentId = " + _connHelper.FilterString(agentId);
_logger.LogDebug("APPLICATIONREPOSITORY | GETPARTNERAUTHORIZATIONKEYS | SQL | " + sql);
var dbRes = _connHelper.ParseDbResult(sql);
_response.ResponseCode = dbRes.ResponseCode;
_response.ResponseMessage = dbRes.ResponseMessage;
if (dbRes.ResponseCode == ResponseHelper.SUCCESS)
{
_response.AgentId = agentId;
_response.APPId = dbRes.Id;
_response.APISecretKey = dbRes.Extra;
}
}
catch (Exception ex)
{
_response.ResponseCode = ResponseHelper.EXCEPTION;
_response.ResponseMessage = "Exception occured: " + ex.Message;
_logger.LogError("APPLICATIONREPOSITORY | GETPARTNERAUTHORIZATIONKEYS | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_response);
}
}
}

1
RemitInboundAPI/RemitInboundAPI.Repository/Repository/ApplicationRepository/IApplicationRepository.cs

@ -9,5 +9,6 @@ namespace RemitInboundAPI.Repository.Repository.ApplicationRepository
Task<CommonResponse> AuthenticateUser(AuthenticateModel model);
Task<CommonResponse> LogInboundData(InboundLogModel model);
Task<CommonResponse> LogUpdateInboundData(CommonResponse response, string rowId);
Task<PartnerAuthorizationKeys> GetPartnerAuthorizationKeys(string? agentId);
}
}

8
RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/IRemitRepository.cs

@ -1,7 +1,11 @@
namespace RemitInboundAPI.Repository.Repository.RemitRepository
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Common.Model.ApplicationModel;
using RemitInboundAPI.Common.Model.RemitModel;
namespace RemitInboundAPI.Repository.Repository.RemitRepository
{
public interface IRemitRepository
{
Task<CommonResponse> CalculateExRate(ExRateModel model, UserLoginModel loginDetails);
}
}

58
RemitInboundAPI/RemitInboundAPI.Repository/Repository/RemitRepository/RemitRepository.cs

@ -1,5 +1,10 @@
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using RemitInboundAPI.Common.Helper;
using RemitInboundAPI.Common.Model;
using RemitInboundAPI.Repository.DBHelper;
using RemitInboundAPI.Common.Model.RemitModel;
using RemitInboundAPI.Common.Model.ApplicationModel;
namespace RemitInboundAPI.Repository.Repository.RemitRepository
{
@ -14,5 +19,58 @@ namespace RemitInboundAPI.Repository.Repository.RemitRepository
_connHelper = connHelper;
}
public async Task<CommonResponse> CalculateExRate(ExRateModel 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 | CALCULATEEXRATE | 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 | CALCULATEEXRATE | 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 | CALCULATEEXRATE | EXCEPTION | " + JsonConvert.SerializeObject(_response));
}
return await Task.FromResult(_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+57e8b53cd1628c96d2f4524d6b116d2b90aa6b40")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ad4414419d104eb84dc6a7d62146e8d7a5340be6")]
[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 @@
96aa750fd52be1dcf2af0a4edca0c88a5244c6869f981c05f7cb6f53798c6ea7
12fd244bc7206a4deab52842594dceb8d381e70bba538314542036f206946cbf

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

177
RemitInboundAPI/RemitInboundAPI/Authorization/AuthorizationAttribute.cs

@ -3,12 +3,15 @@ using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using RemitInboundAPI.Business.Business.ApplicationBusiness;
using RemitInboundAPI.Common.Helper;
using System.Net.Http.Headers;
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Text;
using RemitInboundAPI.Common.Model.ApplicationModel;
using Microsoft.IdentityModel.Tokens;
using Microsoft.AspNetCore.Http.Extensions;
using System.Web;
using Microsoft.Extensions.Caching.Memory;
using System.Net.Http.Headers;
using System.Security.Cryptography;
namespace RemitInboundAPI.Authorization
{
@ -16,9 +19,12 @@ namespace RemitInboundAPI.Authorization
{
private static readonly Serilog.ILogger Log = Serilog.Log.ForContext<AuthorizationAttribute>();
private readonly IApplicationBusiness _applicationBusiness;
private Dictionary<string, string> allowedApps = new Dictionary<string, string>();
private Dictionary<string, string> errorMessages = new Dictionary<string, string>();
private readonly string _audience;
private readonly string _issuer;
private readonly string _secret;
private readonly int _requestMaxAgeInSeconds;
public AuthorizationAttribute(
IOptionsMonitor<AuthenticationSchemeOptions> options,
@ -32,16 +38,44 @@ namespace RemitInboundAPI.Authorization
_audience = Utilities.ReadAppSettings("JWT:ValidAudience");
_issuer = Utilities.ReadAppSettings("JWT:ValidIssuer");
_secret = Utilities.ReadAppSettings("JWT:Secret");
_requestMaxAgeInSeconds = Convert.ToInt16(Utilities.ReadAppSettings("RequestMaxAgeInSeconds"));
}
protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
{
if (!Request.Headers.ContainsKey("Authorization"))
{
errorMessages.Add("ErrorMessage", "Missing Authorization Header");
Log.Error("AUTHORIZATIONATTRIBUTE | HANDLEAUTHENTICATEASYNC | FAILED | Missing Authorization Header");
return await Task.FromResult(AuthenticateResult.Fail("Missing Authorization Header"));
}
var url = "";
var body = "";
var ms = new MemoryStream();
if (Request.Method == "POST")
{
await Request.Body.CopyToAsync(ms);
ms.Seek(0, SeekOrigin.Begin);
url = Request.GetEncodedUrl();
Log.Debug("url: {0}", url);
body = await new StreamReader(ms).ReadToEndAsync();
Log.Debug("Stream Reader Body: {0}", body);
}
else
{
url = Request.GetEncodedUrl().Split("?")[0];
Log.Debug("url: {0}", url);
var query = Request.QueryString;
if (query.HasValue)
{
var queryString = HttpUtility.ParseQueryString(query.Value);
body = JsonConvert.SerializeObject(queryString.AllKeys.ToDictionary(y => y, y => queryString[y]));
}
Log.Debug("Stream Reader Body {0}", body);
}
string token = Request.Headers["Authorization"].ToString().Replace("Bearer ", "");
var tokenHandler = new System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler();
var validationParameters = new TokenValidationParameters()
@ -57,15 +91,150 @@ namespace RemitInboundAPI.Authorization
try
{
ClaimsPrincipal principal = tokenHandler.ValidateToken(token, validationParameters, out _);
var ticket = new AuthenticationTicket(principal, Scheme.Name);
string agentId = principal.FindFirst("AgentId")?.Value;
var allowedAppsDb = await _applicationBusiness.GetPartnerAuthorizationKeys(agentId);
if (allowedAppsDb.ResponseCode != ResponseHelper.SUCCESS)
{
errorMessages.Add("ErrorMessage", allowedAppsDb.ResponseMessage);
Log.Error("GetPartnerAuthorizationKeys Response {0}", allowedAppsDb.ResponseMessage);
return AuthenticateResult.Fail(allowedAppsDb.ResponseMessage);
}
allowedApps.Add(allowedAppsDb.APPId, allowedAppsDb.APISecretKey);
ms.Seek(0, SeekOrigin.Begin);
Request.Body = ms;
//string authHeader = AuthenticationHeaderValue.Parse(Request.Headers["Signature"]).ToString();
//if (string.IsNullOrEmpty(authHeader))
//{
// Log.Error($"AUTHORIZATIONATTRIBUTE | HANDLEAUTHENTICATEASYNC | NULL SIGNATURE");
// return await Task.FromResult(AuthenticateResult.Fail("Invalid Authorization Header"));
//}
//var autherizationHeaderArray = GetAutherizationHeaderValues(authHeader);
//if (autherizationHeaderArray != null)
//{
// var APPId = autherizationHeaderArray[0];
// var incomingBase64Signature = autherizationHeaderArray[1];
// var nonce = autherizationHeaderArray[2];
// var requestTimeStamp = autherizationHeaderArray[3];
// var isValid = await IsValidRequest(APPId, incomingBase64Signature, nonce, requestTimeStamp, body);
// ms.Seek(0, SeekOrigin.Begin);
// Request.Body = ms;
// if (isValid)
// {
// return await Task.FromResult(AuthenticateResult.Success(ticket));
// }
// else
// {
// Log.Error("Invalid Signature");
// return await Task.FromResult(AuthenticateResult.Fail("Invalid Signature"));
// }
//}
//else
//{
// Log.Error("Invalid Signature");
// return await Task.FromResult(AuthenticateResult.Fail("Invalid Signature"));
//}
return await Task.FromResult(AuthenticateResult.Success(ticket));
}
catch (Exception ex)
{
errorMessages.Add("ErrorMessage", ex.Message);
Log.Error($"AUTHORIZATIONATTRIBUTE | HANDLEAUTHENTICATEASYNC | EXCEPTION | " + JsonConvert.SerializeObject(ex.Message));
return AuthenticateResult.Fail("Invalid Authorization Header");
return await Task.FromResult(AuthenticateResult.Fail("Authentication failed."));
}
}
protected override async Task HandleChallengeAsync(AuthenticationProperties properties)
{
Response.StatusCode = 401;
Response.ContentType = "application/json";
var errorMessage = errorMessages["ErrorMessage"] ?? "Authentication failed.";
var errorResponse = JsonConvert.SerializeObject(new { error = errorMessage });
await Response.WriteAsync(errorResponse);
}
private async Task<bool> IsValidRequest(string APPId, string incomingBase64Signature, string nonce, string requestTimeStamp, string body)
{
string requestContentBase64String = "";
if (IsReplayRequest(nonce, requestTimeStamp))
{
Log.Error("isReplayRequest is invalid");
return false;
}
byte[] bytes = Encoding.ASCII.GetBytes(body);
byte[] hash = await ComputeHash(bytes);
if (hash != null)
{
requestContentBase64String = Convert.ToBase64String(hash);
Log.Error("requestContentBase64String {0}", requestContentBase64String);
}
string signatureRawData = String.Format("{0}{1}{2}{3}", APPId, requestTimeStamp, nonce, requestContentBase64String);
var sharedKey = allowedApps[APPId];
var secretKeyBytes = Convert.FromBase64String(sharedKey);
byte[] signature = Encoding.UTF8.GetBytes(signatureRawData);
using (HMACSHA256 hmac = new HMACSHA256(secretKeyBytes))
{
byte[] signatureBytes = hmac.ComputeHash(signature);
return (incomingBase64Signature.Equals(Convert.ToBase64String(signatureBytes), StringComparison.Ordinal));
}
}
public bool IsReplayRequest(string nonce, string requestTimeStamp)
{
Log.Debug("request arrived in isrelay request");
if (System.Runtime.Caching.MemoryCache.Default.Contains(nonce))
{
Log.Error("nonce already in memory");
return true;
}
DateTime epochStart = new DateTime(1970, 01, 01, 0, 0, 0, 0, DateTimeKind.Utc);
Log.Debug("epochStart : {0}", epochStart);
TimeSpan currentTs = DateTime.UtcNow - epochStart;
Log.Debug("currentTs :{0}", currentTs);
Int64 serverTotalSeconds = Convert.ToInt64(currentTs.TotalSeconds);
Log.Debug("serverTotalSeconds :{0}", serverTotalSeconds);
Int64 requestTotalSeconds = Convert.ToInt64(requestTimeStamp);
Log.Debug("requestTotalSeconds {0}", requestTotalSeconds);
if ((serverTotalSeconds - requestTotalSeconds) > _requestMaxAgeInSeconds)
{
Log.Error("serverTotalSeconds: {0} requestTotalSeconds: {1} requestMaxAgeInSeconds: {2} time diff: {3}", serverTotalSeconds, requestTotalSeconds, _requestMaxAgeInSeconds, (serverTotalSeconds - requestTotalSeconds));
return true;
}
Log.Debug("Return False no Issue in isrelayrequest");
System.Runtime.Caching.MemoryCache.Default.Add(nonce, requestTimeStamp, DateTimeOffset.UtcNow.AddSeconds(_requestMaxAgeInSeconds));
return false;
}
public string[] GetAutherizationHeaderValues(string rawAuthzHeader)
{
var credArray = rawAuthzHeader.Split(':');
if (credArray.Length == 4)
{
return credArray;
}
else
{
return null;
}
}
public static async Task<byte[]> ComputeHash(byte[] bytes)
{
using (MD5 md5 = MD5.Create())
{
byte[] hash = null;
var content = bytes;
if (content.Length != 0)
{
hash = md5.ComputeHash(content);
}
return hash;
}
}

30
RemitInboundAPI/RemitInboundAPI/Authorization/AuthorizationHelper.cs

@ -9,9 +9,9 @@ using System.Text;
namespace RemitInboundAPI.Authorization
{
public class AuthorizationHelper
public static class AuthorizationHelper
{
public async Task<CommonResponse> GenerateJWTToken(CommonResponse loginResponse, AuthenticateModel model)
public static async Task<CommonResponse> GenerateJWTToken(CommonResponse loginResponse, AuthenticateModel model)
{
var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(Utilities.ReadAppSettings("JWT:Secret")));
var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);
@ -19,6 +19,7 @@ namespace RemitInboundAPI.Authorization
var claims = new[]
{
new Claim("UserName", model.UserName),
new Claim("AgentId", model.AgentId),
new Claim("ProcessIdentifier", loginResponse.Extra),
new Claim("SessionIdentifier", model.SessionId)
};
@ -34,9 +35,10 @@ namespace RemitInboundAPI.Authorization
TimeZoneInfo localTimeZone = TimeZoneInfo.Local;
var tokenResponse = new
{
Token = new JwtSecurityTokenHandler().WriteToken(token),
ExpiresIn = Convert.ToInt16(Utilities.ReadAppSettings("JWT:ExpiryTimeInMinutes")),
ValidTo = TimeZoneInfo.ConvertTimeFromUtc(token.ValidTo, localTimeZone).ToString(),
AccessToken = new JwtSecurityTokenHandler().WriteToken(token),
TokenType = "Bearer",
ExpiresIn = Convert.ToInt16(Utilities.ReadAppSettings("JWT:ExpiryTimeInMinutes")) * 60,
//ValidTo = TimeZoneInfo.ConvertTimeFromUtc(token.ValidTo, localTimeZone).ToString(),
SessionId = model.SessionId
};
loginResponse.Data = tokenResponse;
@ -45,5 +47,23 @@ namespace RemitInboundAPI.Authorization
return await Task.FromResult(loginResponse);
}
public static async Task<UserLoginModel> GetLoginDetails(ClaimsPrincipal user)
{
UserLoginModel _authModel = new UserLoginModel();
try
{
_authModel.AgentId = user.FindFirst("AgentId")?.Value;
_authModel.UserName = user.FindFirst("UserName")?.Value;
_authModel.SessionId = user.FindFirst("SessionIdentifier")?.Value;
_authModel.ProcessIdentifier = user.FindFirst("ProcessIdentifier")?.Value;
return await Task.FromResult(_authModel);
}
catch (Exception ex)
{
return await Task.FromResult(new UserLoginModel());
}
}
}
}

7
RemitInboundAPI/RemitInboundAPI/Controllers/ApplicationController.cs

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using RemitInboundAPI.Authorization;
using RemitInboundAPI.Business.Business.ApplicationBusiness;
@ -24,6 +25,7 @@ namespace RemitInboundAPI.Controllers
[HttpGet]
[Route("ping")]
[Authorize(AuthenticationSchemes = "ApplicationAuthorization")]
public async Task<IActionResult> Ping()
{
return Ok(new { ResponseCode = 100, ResponseMessage = ResponseMessageHelper.SUCCESS });
@ -45,8 +47,7 @@ namespace RemitInboundAPI.Controllers
if (_response.ResponseCode == ResponseHelper.SUCCESS)
{
AuthorizationHelper _authHelper = new AuthorizationHelper();
_response = await _authHelper.GenerateJWTToken(_response, model);
_response = await AuthorizationHelper.GenerateJWTToken(_response, model);
}
_logger.LogInformation($"APPLICATIONCONTROLLER | GETCOUNTRYSERVICES | RESPONSE | {JsonConvert.SerializeObject(_response)}");
}

27
RemitInboundAPI/RemitInboundAPI/Controllers/RemitController.cs

@ -1,5 +1,14 @@
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using RemitInboundAPI.Authorization;
using RemitInboundAPI.Business.Business.RemitBusiness;
using RemitInboundAPI.Common.Helper;
using RemitInboundAPI.Common.Model.ApplicationModel;
using RemitInboundAPI.Common.Model;
using Serilog.Context;
using Microsoft.AspNetCore.Authorization;
using RemitInboundAPI.Common.Model.RemitModel;
using System.Security.Claims;
namespace RemitInboundAPI.Controllers
{
@ -16,6 +25,24 @@ namespace RemitInboundAPI.Controllers
_remitBusiness = remitBusiness;
}
[HttpPost]
[Route("calculateExRate")]
[Authorize(AuthenticationSchemes = "ApplicationAuthorization")]
public async Task<IActionResult> CalculateExRate(ExRateModel model)
{
var _response = new CommonResponse();
model.SessionId = Convert.ToString(Guid.NewGuid());
model.IpAddress = Utilities.GetIpAddress(HttpContext);
var loginDetails = await AuthorizationHelper.GetLoginDetails(User);
using (LogContext.PushProperty("PartnerSessionId", model.PartnerSessionId))
using (LogContext.PushProperty("SessionId", model.SessionId))
{
_logger.LogInformation($"APPLICATIONCONTROLLER | CALCULATEEXRATE | REQUEST | {JsonConvert.SerializeObject(model)}");
_response = await _remitBusiness.CalculateExRate(model, loginDetails);
_logger.LogInformation($"APPLICATIONCONTROLLER | CALCULATEEXRATE | RESPONSE | {JsonConvert.SerializeObject(_response)}");
}
return Ok(_response);
}
}
}

3
RemitInboundAPI/RemitInboundAPI/Program.cs

@ -31,9 +31,10 @@ builder.Services.AddScoped<IRemitRepository, RemitRepository>();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddMemoryCache();
builder.Services.AddAuthentication()
.AddScheme<AuthenticationSchemeOptions, AuthorizationAttribute>("ApplicationAuthorization", null);
.AddScheme<AuthenticationSchemeOptions, AuthorizationAttribute>("ApplicationAuthorization", options => { });
var app = builder.Build();
app.UseSwagger();

2
RemitInboundAPI/RemitInboundAPI/RemitInboundAPI.csproj

@ -13,6 +13,8 @@
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0" />
</ItemGroup>
<ItemGroup>

3
RemitInboundAPI/RemitInboundAPI/appsettings.json

@ -64,5 +64,6 @@
"ValidAudience": "!M3Un1t3DK!nGd0mU$3Rs",
"ValidIssuer": "IM3Uk",
"Secret": "v9FPjwtQVCpMMLOt+zCLPo2Y4Hy5lWgxW8JPxx+Pg6o="
}
},
"RequestMaxAgeInSeconds": "20"
}

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/Microsoft.Win32.SystemEvents.dll

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

200
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/RemitInboundAPI.deps.json

@ -15,7 +15,9 @@
"Serilog.AspNetCore": "8.0.1",
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.MSSqlServer": "6.5.0",
"Swashbuckle.AspNetCore": "6.5.0"
"Swashbuckle.AspNetCore": "6.5.0",
"System.Runtime.Caching": "8.0.0",
"System.Security.Permissions": "8.0.0"
},
"runtime": {
"RemitInboundAPI.dll": {}
@ -44,7 +46,7 @@
"Microsoft.Identity.Client": "4.45.0",
"Microsoft.Identity.Client.Extensions.Msal": "2.19.3",
"System.Memory": "4.5.4",
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Cryptography.ProtectedData": "8.0.0",
"System.Text.Json": "8.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
},
@ -85,11 +87,11 @@
"Microsoft.SqlServer.Server": "1.0.0",
"Microsoft.Win32.Registry": "5.0.0",
"System.Buffers": "4.5.1",
"System.Configuration.ConfigurationManager": "6.0.1",
"System.Configuration.ConfigurationManager": "8.0.0",
"System.Diagnostics.DiagnosticSource": "8.0.0",
"System.IO": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime.Caching": "5.0.0",
"System.Runtime.Caching": "8.0.0",
"System.Security.Cryptography.Cng": "5.0.0",
"System.Security.Principal.Windows": "5.0.0",
"System.Text.Encoding.CodePages": "5.0.0",
@ -238,7 +240,7 @@
"Microsoft.Identity.Client.Extensions.Msal/2.19.3": {
"dependencies": {
"Microsoft.Identity.Client": "4.45.0",
"System.Security.Cryptography.ProtectedData": "6.0.0"
"System.Security.Cryptography.ProtectedData": "8.0.0"
},
"runtime": {
"lib/netcoreapp2.1/Microsoft.Identity.Client.Extensions.Msal.dll": {
@ -334,26 +336,10 @@
},
"Microsoft.Win32.Registry/5.0.0": {
"dependencies": {
"System.Security.AccessControl": "6.0.0",
"System.Security.AccessControl": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"runtime": {
"lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"Newtonsoft.Json/13.0.3": {
"runtime": {
"lib/net6.0/Newtonsoft.Json.dll": {
@ -515,7 +501,7 @@
"Microsoft.Extensions.Options.ConfigurationExtensions": "6.0.0",
"Serilog": "3.1.1",
"Serilog.Sinks.PeriodicBatching": "3.1.0",
"System.Configuration.ConfigurationManager": "6.0.1"
"System.Configuration.ConfigurationManager": "8.0.0"
},
"runtime": {
"lib/net6.0/Serilog.Sinks.MSSqlServer.dll": {
@ -574,15 +560,15 @@
}
},
"System.Buffers/4.5.1": {},
"System.Configuration.ConfigurationManager/6.0.1": {
"System.Configuration.ConfigurationManager/8.0.0": {
"dependencies": {
"System.Security.Cryptography.ProtectedData": "6.0.0",
"System.Security.Permissions": "6.0.0"
"System.Diagnostics.EventLog": "8.0.0",
"System.Security.Cryptography.ProtectedData": "8.0.0"
},
"runtime": {
"lib/net6.0/System.Configuration.ConfigurationManager.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.922.41905"
"lib/net8.0/System.Configuration.ConfigurationManager.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
@ -614,31 +600,7 @@
}
},
"System.Diagnostics.DiagnosticSource/8.0.0": {},
"System.Drawing.Common/6.0.0": {
"dependencies": {
"Microsoft.Win32.SystemEvents": "6.0.0"
},
"runtime": {
"lib/net6.0/System.Drawing.Common.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/unix/lib/net6.0/System.Drawing.Common.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
},
"runtimes/win/lib/net6.0/System.Drawing.Common.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"System.Diagnostics.EventLog/8.0.0": {},
"System.Formats.Asn1/5.0.0": {},
"System.Globalization/4.3.0": {
"dependencies": {
@ -713,56 +675,52 @@
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.Caching/5.0.0": {
"System.Runtime.Caching/8.0.0": {
"dependencies": {
"System.Configuration.ConfigurationManager": "6.0.1"
"System.Configuration.ConfigurationManager": "8.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Runtime.Caching.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "5.0.20.51904"
"lib/net8.0/System.Runtime.Caching.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
},
"runtimeTargets": {
"runtimes/win/lib/netstandard2.0/System.Runtime.Caching.dll": {
"runtimes/win/lib/net8.0/System.Runtime.Caching.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.0.0",
"fileVersion": "5.0.20.51904"
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
"System.Security.AccessControl/6.0.0": {},
"System.Security.AccessControl/5.0.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
"System.Security.Cryptography.Cng/5.0.0": {
"dependencies": {
"System.Formats.Asn1": "5.0.0"
}
},
"System.Security.Cryptography.ProtectedData/6.0.0": {
"System.Security.Cryptography.ProtectedData/8.0.0": {
"runtime": {
"lib/net6.0/System.Security.Cryptography.ProtectedData.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"lib/net8.0/System.Security.Cryptography.ProtectedData.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
"System.Security.Permissions/6.0.0": {
"System.Security.Permissions/8.0.0": {
"dependencies": {
"System.Security.AccessControl": "6.0.0",
"System.Windows.Extensions": "6.0.0"
"System.Windows.Extensions": "8.0.0"
},
"runtime": {
"lib/net6.0/System.Security.Permissions.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"lib/net8.0/System.Security.Permissions.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
@ -793,22 +751,19 @@
}
},
"System.Threading.Tasks.Extensions/4.5.4": {},
"System.Windows.Extensions/6.0.0": {
"dependencies": {
"System.Drawing.Common": "6.0.0"
},
"System.Windows.Extensions/8.0.0": {
"runtime": {
"lib/net6.0/System.Windows.Extensions.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"lib/net8.0/System.Windows.Extensions.dll": {
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
},
"runtimeTargets": {
"runtimes/win/lib/net6.0/System.Windows.Extensions.dll": {
"runtimes/win/lib/net8.0/System.Windows.Extensions.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
"assemblyVersion": "8.0.0.0",
"fileVersion": "8.0.23.53103"
}
}
},
@ -1102,13 +1057,6 @@
"path": "microsoft.win32.registry/5.0.0",
"hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
},
"Microsoft.Win32.SystemEvents/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A==",
"path": "microsoft.win32.systemevents/6.0.0",
"hashPath": "microsoft.win32.systemevents.6.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": {
"type": "package",
"serviceable": true,
@ -1256,12 +1204,12 @@
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Configuration.ConfigurationManager/6.0.1": {
"System.Configuration.ConfigurationManager/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-jXw9MlUu/kRfEU0WyTptAVueupqIeE3/rl0EZDMlf8pcvJnitQ8HeVEp69rZdaStXwTV72boi/Bhw8lOeO+U2w==",
"path": "system.configuration.configurationmanager/6.0.1",
"hashPath": "system.configuration.configurationmanager.6.0.1.nupkg.sha512"
"sha512": "sha512-JlYi9XVvIREURRUlGMr1F6vOFLk7YSY4p1vHo4kX3tQ0AGrjqlRWHDi66ImHhy6qwXBG3BJ6Y1QlYQ+Qz6Xgww==",
"path": "system.configuration.configurationmanager/8.0.0",
"hashPath": "system.configuration.configurationmanager.8.0.0.nupkg.sha512"
},
"System.Data.SqlClient/4.8.6": {
"type": "package",
@ -1277,12 +1225,12 @@
"path": "system.diagnostics.diagnosticsource/8.0.0",
"hashPath": "system.diagnostics.diagnosticsource.8.0.0.nupkg.sha512"
},
"System.Drawing.Common/6.0.0": {
"System.Diagnostics.EventLog/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
"path": "system.drawing.common/6.0.0",
"hashPath": "system.drawing.common.6.0.0.nupkg.sha512"
"sha512": "sha512-fdYxcRjQqTTacKId/2IECojlDSFvp7LP5N78+0z/xH7v/Tuw5ZAxu23Y6PTCRinqyu2ePx+Gn1098NC6jM6d+A==",
"path": "system.diagnostics.eventlog/8.0.0",
"hashPath": "system.diagnostics.eventlog.8.0.0.nupkg.sha512"
},
"System.Formats.Asn1/5.0.0": {
"type": "package",
@ -1361,19 +1309,19 @@
"path": "system.runtime/4.3.0",
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
},
"System.Runtime.Caching/5.0.0": {
"System.Runtime.Caching/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-30D6MkO8WF9jVGWZIP0hmCN8l9BTY4LCsAzLIe4xFSXzs+AjDotR7DpSmj27pFskDURzUvqYYY0ikModgBTxWw==",
"path": "system.runtime.caching/5.0.0",
"hashPath": "system.runtime.caching.5.0.0.nupkg.sha512"
"sha512": "sha512-4TmlmvGp4kzZomm7J2HJn6IIx0UUrQyhBDyb5O1XiunZlQImXW+B8b7W/sTPcXhSf9rp5NR5aDtQllwbB5elOQ==",
"path": "system.runtime.caching/8.0.0",
"hashPath": "system.runtime.caching.8.0.0.nupkg.sha512"
},
"System.Security.AccessControl/6.0.0": {
"System.Security.AccessControl/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ==",
"path": "system.security.accesscontrol/6.0.0",
"hashPath": "system.security.accesscontrol.6.0.0.nupkg.sha512"
"sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"path": "system.security.accesscontrol/5.0.0",
"hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
},
"System.Security.Cryptography.Cng/5.0.0": {
"type": "package",
@ -1382,19 +1330,19 @@
"path": "system.security.cryptography.cng/5.0.0",
"hashPath": "system.security.cryptography.cng.5.0.0.nupkg.sha512"
},
"System.Security.Cryptography.ProtectedData/6.0.0": {
"System.Security.Cryptography.ProtectedData/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rp1gMNEZpvx9vP0JW0oHLxlf8oSiQgtno77Y4PLUBjSiDYoD77Y8uXHr1Ea5XG4/pIKhqAdxZ8v8OTUtqo9PeQ==",
"path": "system.security.cryptography.protecteddata/6.0.0",
"hashPath": "system.security.cryptography.protecteddata.6.0.0.nupkg.sha512"
"sha512": "sha512-+TUFINV2q2ifyXauQXRwy4CiBhqvDEDZeVJU7qfxya4aRYOKzVBpN+4acx25VcPB9ywUN6C0n8drWl110PhZEg==",
"path": "system.security.cryptography.protecteddata/8.0.0",
"hashPath": "system.security.cryptography.protecteddata.8.0.0.nupkg.sha512"
},
"System.Security.Permissions/6.0.0": {
"System.Security.Permissions/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-T/uuc7AklkDoxmcJ7LGkyX1CcSviZuLCa4jg3PekfJ7SU0niF0IVTXwUiNVP9DSpzou2PpxJ+eNY2IfDM90ZCg==",
"path": "system.security.permissions/6.0.0",
"hashPath": "system.security.permissions.6.0.0.nupkg.sha512"
"sha512": "sha512-v/BBylw7XevuAsHXoX9dDUUfmBIcUf7Lkz8K3ZXIKz3YRKpw8YftpSir4n4e/jDTKFoaK37AsC3xnk+GNFI1Ow==",
"path": "system.security.permissions/8.0.0",
"hashPath": "system.security.permissions.8.0.0.nupkg.sha512"
},
"System.Security.Principal.Windows/5.0.0": {
"type": "package",
@ -1445,12 +1393,12 @@
"path": "system.threading.tasks.extensions/4.5.4",
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
},
"System.Windows.Extensions/6.0.0": {
"System.Windows.Extensions/8.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==",
"path": "system.windows.extensions/6.0.0",
"hashPath": "system.windows.extensions.6.0.0.nupkg.sha512"
"sha512": "sha512-Obg3a90MkOw9mYKxrardLpY2u0axDMrSmy4JCdq2cYbelM2cUwmUir5Bomvd1yxmPL9h5LVHU1tuKBZpUjfASg==",
"path": "system.windows.extensions/8.0.0",
"hashPath": "system.windows.extensions.8.0.0.nupkg.sha512"
},
"RemitInboundAPI.Business/1.0.0": {
"type": "project",

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

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Configuration.ConfigurationManager.dll

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

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Runtime.Caching.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Security.Cryptography.ProtectedData.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Security.Permissions.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/System.Windows.Extensions.dll

3
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/appsettings.json

@ -64,5 +64,6 @@
"ValidAudience": "!M3Un1t3DK!nGd0mU$3Rs",
"ValidIssuer": "IM3Uk",
"Secret": "v9FPjwtQVCpMMLOt+zCLPo2Y4Hy5lWgxW8JPxx+Pg6o="
}
},
"RequestMaxAgeInSeconds": "20"
}

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/unix/lib/net6.0/System.Drawing.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/Microsoft.Win32.SystemEvents.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/System.Drawing.Common.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/System.Security.Cryptography.ProtectedData.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net6.0/System.Windows.Extensions.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Runtime.Caching.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/net8.0/System.Windows.Extensions.dll

BIN
RemitInboundAPI/RemitInboundAPI/bin/Debug/net8.0/runtimes/win/lib/netstandard2.0/System.Runtime.Caching.dll

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+57e8b53cd1628c96d2f4524d6b116d2b90aa6b40")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ad4414419d104eb84dc6a7d62146e8d7a5340be6")]
[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 @@
c26455dd1ba994feb51bd5f0c8e8a0ab137106eea4ba8e48ea48560c94a497d7
5713324c6abe5cf64c63cb345b501ba3a48bc09f142aa964eb43371e38ad2287

BIN
RemitInboundAPI/RemitInboundAPI/obj/Debug/net8.0/RemitInboundAPI.assets.cache

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

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

@ -1 +1 @@
379e5128b21575aa467ebdcd349952169816fe9daffde0624da1fac62dc45d02
5734d75b278eb22e45f2f8fe78121bbc994a1ed5ada8e27d55d3f93e4f379190

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save