From e66c47c8c98f20a0b20f05e4e1c1faa906240d40 Mon Sep 17 00:00:00 2001 From: Leeza Baidar Date: Tue, 23 Jan 2024 11:01:42 +0545 Subject: [PATCH] #24417 referral points changes --- .../CustomerOnlineV2.Common/Helper/LoginUserInfo.cs | 5 ++++- .../Models/AccountModel/AccountModel.cs | 3 +++ .../Repository/AccountRepository/AccountRepository.cs | 3 +++ .../CustomerOnlineV2/Controllers/AccountController.cs | 3 +++ .../CustomerOnlineV2/Views/Customer/Refer.cshtml | 4 ++-- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Helper/LoginUserInfo.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Helper/LoginUserInfo.cs index 7770a56..5267672 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Helper/LoginUserInfo.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Helper/LoginUserInfo.cs @@ -23,7 +23,10 @@ namespace CustomerOnlineV2.Common.Helper model.RememberMe = Convert.ToBoolean(claimIdentity.FindFirst(x => x.Type == "RememberMe").Value); model.SessionId = claimIdentity.FindFirst(x => x.Type == "SessionId").Value; model.UserId = claimIdentity.FindFirst(x => x.Type == "UserId").Value; - + model.TotalPoints = claimIdentity.FindFirst(x => x.Type == "TotalPoints").Value; + model.RegPoints = claimIdentity.FindFirst(x => x.Type == "RegPoints").Value; + model.TranPoints = claimIdentity.FindFirst(x => x.Type == "TranPoints").Value; + } return model; } diff --git a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/AccountModel/AccountModel.cs b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/AccountModel/AccountModel.cs index b0c6cb6..259ee75 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Common/Models/AccountModel/AccountModel.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Common/Models/AccountModel/AccountModel.cs @@ -46,6 +46,9 @@ namespace CustomerOnlineV2.Common.Models.AccountModel public string? MembershipId { get; set; } public bool IsEmailVerified { get; set; } public string? Selfiepath { get; set; } + public string? TotalPoints { get; set;} + public string? RegPoints { get; set; } + public string? TranPoints { get; set; } } public class VerifyOtpModel { diff --git a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/AccountRepository/AccountRepository.cs b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/AccountRepository/AccountRepository.cs index d0e3ee2..b6429bd 100644 --- a/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/AccountRepository/AccountRepository.cs +++ b/CustomerOnlineV2/CustomerOnlineV2.Repository/Repository/AccountRepository/AccountRepository.cs @@ -59,6 +59,9 @@ namespace CustomerOnlineV2.Repository.Repository.AccountRepository _response.SessionId = model.SessionId; _response.IsEmailVerified = Convert.ToBoolean(dr["IsEmailVerified"]); _response.Selfiepath = Convert.ToString(dr["SelfieDoc"]); + _response.TotalPoints = Convert.ToString(dr["TotalPoints"]); + _response.RegPoints = Convert.ToString(dr["RegPoints"]); + _response.TranPoints = Convert.ToString(dr["TranPoints"]); } } } diff --git a/CustomerOnlineV2/CustomerOnlineV2/Controllers/AccountController.cs b/CustomerOnlineV2/CustomerOnlineV2/Controllers/AccountController.cs index e7231ce..0e8db0c 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Controllers/AccountController.cs +++ b/CustomerOnlineV2/CustomerOnlineV2/Controllers/AccountController.cs @@ -77,6 +77,9 @@ namespace CustomerOnlineV2.Controllers new Claim("UserId", result.UserId), new Claim("MembershipId", result.MembershipId), new Claim("SelfieDoc", Convert.ToString(result.Selfiepath)), + new Claim("TotalPoints", result.TotalPoints), + new Claim("RegPoints", result.RegPoints), + new Claim("TranPoints", result.TranPoints), }; var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme); diff --git a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml index 417987f..99f8058 100644 --- a/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml +++ b/CustomerOnlineV2/CustomerOnlineV2/Views/Customer/Refer.cshtml @@ -160,8 +160,8 @@

Available Reward Amount:

Refer Now

-

Receive a FREE £5.00 bonus credit as Reward Amount

-

You and your friend will each be given £5.00 in bonus credit. Get £1.00 after they successfully register, and 4$ after their first transaction.

+

Receive a FREE £@User.FindFirst("TotalPoints").Value bonus credit as Reward Amount

+

You and your friend will each be given £@User.FindFirst("TotalPoints").Value in bonus credit. Get £@User.FindFirst("RegPoints").Value after they successfully register, and £@User.FindFirst("TranPoints").Value after their first transaction.

There may be minimum send requirements.

Terms & Conditions

@*

Refer IME Londong to your friends & get many more exciting deals
plus discount on your every transfer.

*@