Corrected adding the subscription after payment
This commit is contained in:
parent
86b37549eb
commit
4916a95eb4
@ -933,7 +933,6 @@ namespace Marco.Pms.Services.Controllers
|
||||
}
|
||||
|
||||
var industry = await context.Industries.FirstOrDefaultAsync(i => i.Id == model.IndustryId);
|
||||
|
||||
if (industry == null)
|
||||
{
|
||||
_logger.LogWarning("Industry not found while creating the tenant enquire");
|
||||
|
||||
@ -310,11 +310,11 @@ namespace Marco.Pms.Services.Service
|
||||
var tenantVM = _mapper.Map<TenantVM>(tenant);
|
||||
tenantVM.CreatedBy = _mapper.Map<BasicEmployeeVM>(employeeUser);
|
||||
|
||||
await AddSubscriptionAsync(tenantId, employeeId, paymentDetailId, planId);
|
||||
|
||||
// Commit the transaction as all operations were successful.
|
||||
await transaction.CommitAsync();
|
||||
|
||||
await AddSubscriptionAsync(tenantId, employeeId, paymentDetailId, planId);
|
||||
|
||||
_logger.LogInfo("Successfully created tenant {TenantId} for organization {OrganizationName}.", tenant.Id, tenant.Name);
|
||||
return ApiResponse<object>.SuccessResponse(tenantVM, "Tenant created successfully.", 201);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user