fix: add CmsBaseUrl/FrontOfficeBaseUrl to appsettings.json for staging callback URLs
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 7m43s
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:
+1
-1
@@ -494,6 +494,6 @@ fabric.properties
|
||||
/src/.idea
|
||||
|
||||
# Environment-specific configuration files with sensitive data
|
||||
#**/appsettings.Staging.json
|
||||
**/appsettings.Staging.json
|
||||
**/appsettings.Production.json
|
||||
**/appsettings.*.local.json
|
||||
|
||||
+5
-1
@@ -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}"
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
"MerchantId": "6b098fc8-f490-47a1-aac3-1de1a1b84404",
|
||||
"UseSandbox": true
|
||||
},
|
||||
"CmsBaseUrl": "https://cms.se.kbs1.ir",
|
||||
"FrontOfficeBaseUrl": "https://foursat.se.kbs1.ir",
|
||||
"FMS": {
|
||||
"Address": "https://dl.afrino.co"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user