feat: add payment callback and referral link features
Build and Deploy / build (push) Failing after 1m21s
Build and Deploy / build (push) Failing after 1m21s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using FrontOffice.Main.Utilities;
|
||||
using FrontOffice.BFF.User.Protobuf.Protos.User;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
|
||||
@@ -7,6 +8,8 @@ namespace FrontOffice.Main.Pages.Club.Components;
|
||||
public partial class ActivationSection : ComponentBase
|
||||
{
|
||||
[Inject] private ClubMembershipService ClubService { get; set; } = default!;
|
||||
[Inject] private AuthService AuthService { get; set; } = default!;
|
||||
[Inject] private UserContract.UserContractClient UserContract { get; set; } = default!;
|
||||
|
||||
[Parameter] public EventCallback OnActivationSuccess { get; set; }
|
||||
|
||||
@@ -39,6 +42,19 @@ public partial class ActivationSection : ComponentBase
|
||||
if (result.Success)
|
||||
{
|
||||
Snackbar.Add($"عضویت فعال شد! مبلغ پرداختی: {result.AmountPaid:N0} تومان", Severity.Success);
|
||||
|
||||
// Refresh Token to update Claims (IsClubMemberActive, HasPurchasedPackage)
|
||||
try
|
||||
{
|
||||
var userResponse = await UserContract.GetUserAsync(new());
|
||||
await AuthService.InitUserAuthInfo();
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Token refresh failed but activation succeeded
|
||||
Snackbar.Add("لطفاً مجدداً وارد شوید تا تغییرات اعمال شود.", Severity.Warning);
|
||||
}
|
||||
|
||||
await OnActivationSuccess.InvokeAsync();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user