11
11
using Bit . Core . Billing . Entities ;
12
12
using Bit . Core . Billing . Enums ;
13
13
using Bit . Core . Billing . Extensions ;
14
+ using Bit . Core . Billing . Pricing ;
14
15
using Bit . Core . Billing . Repositories ;
15
16
using Bit . Core . Billing . Services ;
16
17
using Bit . Core . Billing . Services . Contracts ;
@@ -42,6 +43,7 @@ public class ProvidersController : Controller
42
43
private readonly IFeatureService _featureService ;
43
44
private readonly IProviderPlanRepository _providerPlanRepository ;
44
45
private readonly IProviderBillingService _providerBillingService ;
46
+ private readonly IPricingClient _pricingClient ;
45
47
private readonly string _stripeUrl ;
46
48
private readonly string _braintreeMerchantUrl ;
47
49
private readonly string _braintreeMerchantId ;
@@ -60,7 +62,8 @@ public ProvidersController(
60
62
IFeatureService featureService ,
61
63
IProviderPlanRepository providerPlanRepository ,
62
64
IProviderBillingService providerBillingService ,
63
- IWebHostEnvironment webHostEnvironment )
65
+ IWebHostEnvironment webHostEnvironment ,
66
+ IPricingClient pricingClient )
64
67
{
65
68
_organizationRepository = organizationRepository ;
66
69
_organizationService = organizationService ;
@@ -75,6 +78,7 @@ public ProvidersController(
75
78
_featureService = featureService ;
76
79
_providerPlanRepository = providerPlanRepository ;
77
80
_providerBillingService = providerBillingService ;
81
+ _pricingClient = pricingClient ;
78
82
_stripeUrl = webHostEnvironment . GetStripeUrl ( ) ;
79
83
_braintreeMerchantUrl = webHostEnvironment . GetBraintreeMerchantUrl ( ) ;
80
84
_braintreeMerchantId = globalSettings . Braintree . MerchantId ;
@@ -415,7 +419,9 @@ public async Task<IActionResult> CreateOrganization(Guid providerId)
415
419
return RedirectToAction ( "Index" ) ;
416
420
}
417
421
418
- return View ( new OrganizationEditModel ( provider ) ) ;
422
+ var plans = await _pricingClient . ListPlans ( ) ;
423
+
424
+ return View ( new OrganizationEditModel ( provider , plans ) ) ;
419
425
}
420
426
421
427
[ HttpPost ]
0 commit comments