diff --git a/Morphic.Server.Tests/Community/CommunitiesEndpointTests.cs b/Morphic.Server.Tests/Community/CommunitiesEndpointTests.cs index ca8a103..ac7fc3a 100644 --- a/Morphic.Server.Tests/Community/CommunitiesEndpointTests.cs +++ b/Morphic.Server.Tests/Community/CommunitiesEndpointTests.cs @@ -101,7 +101,8 @@ public async Task TestPost() Assert.True(element.TryGetProperty("name", out property)); Assert.Equal(JsonValueKind.String, property.ValueKind); Assert.Equal("Test Community", property.GetString()); - Assert.Equal(1, paymentProcessor.StartCommunitySubscriptionCalls); + // Not calling stripe anymore + //Assert.Equal(1, paymentProcessor.StartCommunitySubscriptionCalls); } } } \ No newline at end of file diff --git a/Morphic.Server/Billing/Plans.Test.json b/Morphic.Server/Billing/Plans.Test.json index 3d30365..a455fab 100644 --- a/Morphic.Server/Billing/Plans.Test.json +++ b/Morphic.Server/Billing/Plans.Test.json @@ -1,133 +1,133 @@ [ - { - "id": "basic", - "active": true, - "default": true, - "member_limit": 0, - "months": 0, - "price": 0, - "currency": "USD", - "stripe": { - "price_id": "price_1JeR4BFNS9zyw2T77JAX47hI" - } - }, - { - "id": "plus-5", - "active": true, - "member_limit": 5, - "months": 12, - "price": 3500, - "currency": "USD", - "stripe": { - "price_id": "price_1JdENoFNS9zyw2T7Bl7I80PD" - } - }, - { - "id": "plus-5-monthly", - "active": true, - "member_limit": 5, - "months": 1, - "price": 500, - "currency": "USD", - "stripe": { - "price_id": "price_1JdENoFNS9zyw2T72srDDRU1" - } - }, - { - "id": "plus-15", - "active": true, - "member_limit": 15, - "months": 12, - "price": 7000, - "currency": "USD", - "stripe": { - "price_id": "price_1JdEOgFNS9zyw2T7bnmZPowr" - } - }, - { - "id": "plus-15-monthly", - "active": true, - "member_limit": 15, - "months": 1, - "price": 1000, - "currency": "USD", - "stripe": { - "price_id": "price_1JdEOgFNS9zyw2T7GbiK6PWN" - } - }, + { + "id": "basic", + "active": true, + "member_limit": 0, + "months": 0, + "price": 0, + "currency": "USD", + "stripe": { + "price_id": "price_1JeR4BFNS9zyw2T77JAX47hI" + } + }, + { + "id": "plus-5", + "active": true, + "default": true, + "member_limit": 5, + "months": 12, + "price": 3500, + "currency": "USD", + "stripe": { + "price_id": "price_1JdENoFNS9zyw2T7Bl7I80PD" + } + }, + { + "id": "plus-5-monthly", + "active": true, + "member_limit": 5, + "months": 1, + "price": 500, + "currency": "USD", + "stripe": { + "price_id": "price_1JdENoFNS9zyw2T72srDDRU1" + } + }, + { + "id": "plus-15", + "active": true, + "member_limit": 15, + "months": 12, + "price": 7000, + "currency": "USD", + "stripe": { + "price_id": "price_1JdEOgFNS9zyw2T7bnmZPowr" + } + }, + { + "id": "plus-15-monthly", + "active": true, + "member_limit": 15, + "months": 1, + "price": 1000, + "currency": "USD", + "stripe": { + "price_id": "price_1JdEOgFNS9zyw2T7GbiK6PWN" + } + }, - { - "id": "basic-1-month", - "active": true, - "member_limit": 5, - "months": 1, - "price": 600, - "currency": "USD", - "stripe": { - "price_id": "price_1HEhXfFNS9zyw2T7YKMUaXSj" - } - }, - { - "id": "basic-6-month", - "active": true, - "member_limit": 5, - "months": 6, - "price": 3000, - "currency": "USD", - "stripe": { - "price_id": "price_1HEhXgFNS9zyw2T7e3cI465S" - } - }, - { - "id": "midsize-1-month", - "active": true, - "member_limit": 15, - "months": 1, - "price": 1200, - "currency": "USD", - "stripe": { - "price_id": "price_1HFow2FNS9zyw2T78bjQXsDs" - } - }, - { - "id": "midsize-6-month", - "active": true, - "member_limit": 15, - "months": 6, - "price": 6000, - "currency": "USD", - "stripe": { - "price_id": "price_1HFow1FNS9zyw2T7PpddvHeZ" - } - }, - { - "id": "large-1-month", - "active": true, - "member_limit": 50, - "months": 1, - "price": 3600, - "currency": "USD", - "stripe": { - "price_id": "price_1HFoxYFNS9zyw2T7MrIomwoP" - } - }, - { - "id": "large-6-month", - "active": true, - "member_limit": 50, - "months": 6, - "price": 18000, - "currency": "USD", - "stripe": { - "price_id": "price_1HFoxYFNS9zyw2T7t4A35YYJ" - } - }, - { - "id": "enterprise-1", - "active": true, - "internal": true, - "member_limit": 0, - "months": 12, - "price": -1 + { + "id": "basic-1-month", + "active": true, + "member_limit": 5, + "months": 1, + "price": 600, + "currency": "USD", + "stripe": { + "price_id": "price_1HEhXfFNS9zyw2T7YKMUaXSj" + } + }, + { + "id": "basic-6-month", + "active": true, + "member_limit": 5, + "months": 6, + "price": 3000, + "currency": "USD", + "stripe": { + "price_id": "price_1HEhXgFNS9zyw2T7e3cI465S" + } + }, + { + "id": "midsize-1-month", + "active": true, + "member_limit": 15, + "months": 1, + "price": 1200, + "currency": "USD", + "stripe": { + "price_id": "price_1HFow2FNS9zyw2T78bjQXsDs" + } + }, + { + "id": "midsize-6-month", + "active": true, + "member_limit": 15, + "months": 6, + "price": 6000, + "currency": "USD", + "stripe": { + "price_id": "price_1HFow1FNS9zyw2T7PpddvHeZ" + } + }, + { + "id": "large-1-month", + "active": true, + "member_limit": 50, + "months": 1, + "price": 3600, + "currency": "USD", + "stripe": { + "price_id": "price_1HFoxYFNS9zyw2T7MrIomwoP" + } + }, + { + "id": "large-6-month", + "active": true, + "member_limit": 50, + "months": 6, + "price": 18000, + "currency": "USD", + "stripe": { + "price_id": "price_1HFoxYFNS9zyw2T7t4A35YYJ" } + }, + { + "id": "enterprise-1", + "active": true, + "internal": true, + "member_limit": 0, + "months": 12, + "price": -1 + } ] \ No newline at end of file diff --git a/Morphic.Server/Billing/Plans.json b/Morphic.Server/Billing/Plans.json index dce4f1e..f95b7e7 100644 --- a/Morphic.Server/Billing/Plans.json +++ b/Morphic.Server/Billing/Plans.json @@ -1,133 +1,133 @@ [ - { - "id": "basic", - "active": true, - "default": true, - "member_limit": 0, - "months": 0, - "price": 0, - "currency": "USD", - "stripe": { - "price_id": "price_1Jee0ZFNS9zyw2T7qM6GUbGm" - } - }, - { - "id": "plus-5", - "active": true, - "member_limit": 5, - "months": 12, - "price": 3500, - "currency": "USD", - "stripe": { - "price_id": "price_1JdFTiFNS9zyw2T7fg1X2Tw9" - } - }, - { - "id": "plus-5-monthly", - "active": true, - "member_limit": 5, - "months": 1, - "price": 500, - "currency": "USD", - "stripe": { - "price_id": "price_1JdFTiFNS9zyw2T7S61gRt2w" - } - }, - { - "id": "plus-15", - "active": true, - "member_limit": 15, - "months": 12, - "price": 7000, - "currency": "USD", - "stripe": { - "price_id": "price_1JdFTRFNS9zyw2T7bTyimek6" - } - }, - { - "id": "plus-15-monthly", - "active": true, - "member_limit": 15, - "months": 1, - "price": 1000, - "currency": "USD", - "stripe": { - "price_id": "price_1JdFTRFNS9zyw2T7wbefrunf" - } - }, + { + "id": "basic", + "active": true, + "member_limit": 0, + "months": 0, + "price": 0, + "currency": "USD", + "stripe": { + "price_id": "price_1Jee0ZFNS9zyw2T7qM6GUbGm" + } + }, + { + "id": "plus-5", + "active": true, + "default": true, + "member_limit": 5, + "months": 12, + "price": 3500, + "currency": "USD", + "stripe": { + "price_id": "price_1JdFTiFNS9zyw2T7fg1X2Tw9" + } + }, + { + "id": "plus-5-monthly", + "active": true, + "member_limit": 5, + "months": 1, + "price": 500, + "currency": "USD", + "stripe": { + "price_id": "price_1JdFTiFNS9zyw2T7S61gRt2w" + } + }, + { + "id": "plus-15", + "active": true, + "member_limit": 15, + "months": 12, + "price": 7000, + "currency": "USD", + "stripe": { + "price_id": "price_1JdFTRFNS9zyw2T7bTyimek6" + } + }, + { + "id": "plus-15-monthly", + "active": true, + "member_limit": 15, + "months": 1, + "price": 1000, + "currency": "USD", + "stripe": { + "price_id": "price_1JdFTRFNS9zyw2T7wbefrunf" + } + }, - { - "id": "basic-1-month", - "active": true, - "member_limit": 5, - "months": 1, - "price": 600, - "currency": "USD", - "stripe": { - "price_id": "price_1HEfJgFNS9zyw2T7js0QBmSM" - } - }, - { - "id": "basic-6-month", - "active": true, - "member_limit": 5, - "months": 6, - "price": 3000, - "currency": "USD", - "stripe": { - "price_id": "price_1HEfJgFNS9zyw2T7CAAkOzhm" - } - }, - { - "id": "midsize-1-month", - "active": true, - "member_limit": 15, - "months": 1, - "price": 1200, - "currency": "USD", - "stripe": { - "price_id": "price_1HS7M7FNS9zyw2T7Kn8wu5wF" - } - }, - { - "id": "midsize-6-month", - "active": true, - "member_limit": 15, - "months": 6, - "price": 6000, - "currency": "USD", - "stripe": { - "price_id": "price_1HS7M7FNS9zyw2T7w8eKfyWb" - } - }, - { - "id": "large-1-month", - "active": true, - "member_limit": 50, - "months": 1, - "price": 3600, - "currency": "USD", - "stripe": { - "price_id": "price_1HS7MtFNS9zyw2T7OKhpAlis" - } - }, - { - "id": "large-6-month", - "active": true, - "member_limit": 50, - "months": 6, - "price": 18000, - "currency": "USD", - "stripe": { - "price_id": "price_1HS7MtFNS9zyw2T7XfwmUgXU" - } - }, - { - "id": "enterprise-1", - "active": true, - "internal": true, - "member_limit": 0, - "months": 12, - "price": -1 + { + "id": "basic-1-month", + "active": true, + "member_limit": 5, + "months": 1, + "price": 600, + "currency": "USD", + "stripe": { + "price_id": "price_1HEfJgFNS9zyw2T7js0QBmSM" + } + }, + { + "id": "basic-6-month", + "active": true, + "member_limit": 5, + "months": 6, + "price": 3000, + "currency": "USD", + "stripe": { + "price_id": "price_1HEfJgFNS9zyw2T7CAAkOzhm" + } + }, + { + "id": "midsize-1-month", + "active": true, + "member_limit": 15, + "months": 1, + "price": 1200, + "currency": "USD", + "stripe": { + "price_id": "price_1HS7M7FNS9zyw2T7Kn8wu5wF" + } + }, + { + "id": "midsize-6-month", + "active": true, + "member_limit": 15, + "months": 6, + "price": 6000, + "currency": "USD", + "stripe": { + "price_id": "price_1HS7M7FNS9zyw2T7w8eKfyWb" + } + }, + { + "id": "large-1-month", + "active": true, + "member_limit": 50, + "months": 1, + "price": 3600, + "currency": "USD", + "stripe": { + "price_id": "price_1HS7MtFNS9zyw2T7OKhpAlis" + } + }, + { + "id": "large-6-month", + "active": true, + "member_limit": 50, + "months": 6, + "price": 18000, + "currency": "USD", + "stripe": { + "price_id": "price_1HS7MtFNS9zyw2T7XfwmUgXU" } + }, + { + "id": "enterprise-1", + "active": true, + "internal": true, + "member_limit": 0, + "months": 12, + "price": -1 + } ] \ No newline at end of file diff --git a/Morphic.Server/Billing/StripePaymentProcessor.cs b/Morphic.Server/Billing/StripePaymentProcessor.cs index 581bf64..6807f60 100644 --- a/Morphic.Server/Billing/StripePaymentProcessor.cs +++ b/Morphic.Server/Billing/StripePaymentProcessor.cs @@ -127,7 +127,7 @@ public async Task ChangeCommunitySubscription(Community community, BillingRecord { Price = stripePlan.PriceId }; - await SubscriptionItems.UpdateAsync(billing.Stripe!.SubscriptionItemId, update, RequestOptions); + //await SubscriptionItems.UpdateAsync(billing.Stripe!.SubscriptionItemId, update, RequestOptions); } catch (StripeException e) { diff --git a/Morphic.Server/Community/CommunitiesEndpoint.cs b/Morphic.Server/Community/CommunitiesEndpoint.cs index cb4b042..729b808 100644 --- a/Morphic.Server/Community/CommunitiesEndpoint.cs +++ b/Morphic.Server/Community/CommunitiesEndpoint.cs @@ -178,7 +178,7 @@ public async Task Post() }; await db.Save(community); - await paymentProcessor.StartCommunitySubscription(community, billing, User); + //await paymentProcessor.StartCommunitySubscription(community, billing, User); await db.Save(billing);