fix: add CmsBaseUrl/FrontOfficeBaseUrl to appsettings.json for staging callback URLs
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 7m43s

- Added CmsBaseUrl=https://cms.se.kbs1.ir to appsettings.json
- Added FrontOfficeBaseUrl=https://foursat.se.kbs1.ir to appsettings.json
- Fixed PurchasePackageCommandHandler hardcoded yourdomain.com
- Development keeps localhost values via appsettings.Development.json
This commit is contained in:
masoodafar-web
2026-02-16 02:31:27 +03:30
parent 61a0d68b7c
commit e2e09ac4e8
3 changed files with 8 additions and 2 deletions
@@ -5,6 +5,7 @@ using CMSMicroservice.Domain.Entities;
using CMSMicroservice.Domain.Enums;
using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using ValidationException = FluentValidation.ValidationException;
@@ -15,15 +16,18 @@ public class PurchasePackageCommandHandler
{
private readonly IApplicationDbContext _context;
private readonly IPaymentGatewayService _paymentGateway;
private readonly IConfiguration _configuration;
private readonly ILogger<PurchasePackageCommandHandler> _logger;
public PurchasePackageCommandHandler(
IApplicationDbContext context,
IPaymentGatewayService paymentGateway,
IConfiguration configuration,
ILogger<PurchasePackageCommandHandler> logger)
{
_context = context;
_paymentGateway = paymentGateway;
_configuration = configuration;
_logger = logger;
}
@@ -116,7 +120,7 @@ public class PurchasePackageCommandHandler
Amount = order.Amount,
UserId = user.Id,
Mobile = user.Mobile ?? "",
CallbackUrl = $"https://yourdomain.com/api/package/verify-package",
CallbackUrl = $"{_configuration["CmsBaseUrl"] ?? "https://localhost:32846"}/api/package/verify-package",
Description = $"خرید پکیج - سفارش #{order.Id}"
};