feat: add payment callback and referral link features
Build and Deploy / build (push) Failing after 1m21s

This commit is contained in:
masoodafar-web
2025-12-16 02:33:56 +03:30
parent 3c528aba48
commit 3af564be73
7 changed files with 425 additions and 33 deletions
@@ -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