1
0
mirror of https://github.com/bitwarden/server synced 2025-12-06 00:03:34 +00:00
Commit Graph

105 Commits

Author SHA1 Message Date
Alex Morask
c620ec2aca [PM-28250] Fix seat add on defect (#6580)
* Handle seat add on

* Remove old price instead
2025-11-17 10:50:10 -06:00
Stephon Brown
30ff175f8e Milestone 2 Handler Update (#6564)
* fix(billing): update discount id

* test(billing) update test
2025-11-13 17:47:06 +00:00
Alex Morask
59a64af345 [PM-26435] Milestone 3 / F19R (#6574)
* Re-organize UpcomingInvoiceHandler for readability

* Milestone 3 renewal

* Map premium access data from additonal data in pricing

* Feedback

* Fix test
2025-11-13 09:09:01 -06:00
Stephon Brown
db36c52c62 Milestone 2C Update (#6560)
* fix(billing): milestone update

* tests(billing): update tests
2025-11-10 16:07:14 -05:00
Stephon Brown
5dbce33f74 [PM-24273] Milestone 2C (#6544)
* feat(billing): add mjml template and updated templates

* feat(billing): update maileservices

* feat(billing): add milestone2 discount

* feat(billing): add milestone 2 updates and stripe constants

* tests(billing): add handler tests

* fix(billing): update mailer view and templates

* fix(billing): revert mailservice changes

* fix(billing): swap mailer service in handler

* test(billing): update handler tests
2025-11-06 13:21:29 -05:00
Alex Morask
62a0936c2e [PM-25183] Update the BitPay purchasing procedure (#6396)
* Revise BitPay controller

* Run dotnet format

* Kyle's feedback

* Run dotnet format

* Temporary logging

* Whoops

* Undo temporary logging
2025-10-28 09:31:59 -05:00
cyprain-okeke
427600d0cc [PM-26194] Fix: Provider Portal not automatically disabled, when subscription is cancelled (#6480)
* Add the fix for the bug

* Move the org disable to job
2025-10-27 13:19:42 +01:00
Alex Morask
9c51c9971b [PM-21638] Stripe .NET v48 (#6202)
* Upgrade Stripe.net to v48.4.0

* Update PreviewTaxAmountCommand

* Remove unused UpcomingInvoiceOptionExtensions

* Added SubscriptionExtensions with GetCurrentPeriodEnd

* Update PremiumUserBillingService

* Update OrganizationBillingService

* Update GetOrganizationWarningsQuery

* Update BillingHistoryInfo

* Update SubscriptionInfo

* Remove unused Sql Billing folder

* Update StripeAdapter

* Update StripePaymentService

* Update InvoiceCreatedHandler

* Update PaymentFailedHandler

* Update PaymentSucceededHandler

* Update ProviderEventService

* Update StripeEventUtilityService

* Update SubscriptionDeletedHandler

* Update SubscriptionUpdatedHandler

* Update UpcomingInvoiceHandler

* Update ProviderSubscriptionResponse

* Remove unused Stripe Subscriptions Admin Tool

* Update RemoveOrganizationFromProviderCommand

* Update ProviderBillingService

* Update RemoveOrganizatinoFromProviderCommandTests

* Update PreviewTaxAmountCommandTests

* Update GetCloudOrganizationLicenseQueryTests

* Update GetOrganizationWarningsQueryTests

* Update StripePaymentServiceTests

* Update ProviderBillingControllerTests

* Update ProviderEventServiceTests

* Update SubscriptionDeletedHandlerTests

* Update SubscriptionUpdatedHandlerTests

* Resolve Billing test failures

I completely removed tests for the StripeEventService as they were using a system I setup a while back that read JSON files of the Stripe event structure. I did not anticipate how frequently these structures would change with each API version and the cost of trying to update these specific JSON files to test a very static data retrieval service far outweigh the benefit.

* Resolve Core test failures

* Run dotnet format

* Remove unused provider migration

* Fixed failing tests

* Run dotnet format

* Replace the old webhook secret key with new one (#6223)

* Fix compilation failures in additions

* Run dotnet format

* Bump Stripe API version

* Fix recent addition: CreatePremiumCloudHostedSubscriptionCommand

* Fix new code in main according to Stripe update

* Fix InvoiceExtensions

* Bump SDK version to match API Version

* Fix provider invoice generation validation

* More QA fixes

* Fix tests

* QA defect resolutions

* QA defect resolutions

* Run dotnet format

* Fix tests

---------

Co-authored-by: cyprain-okeke <108260115+cyprain-okeke@users.noreply.github.com>
2025-10-21 14:07:55 -05:00
Vijay Oommen
a6726d2e04 PM-26208 updated api endpoint (#6431) 2025-10-09 10:47:54 -05:00
Alex Morask
3dd5accb56 [PM-24964] Stripe-hosted bank account verification (#6263)
* Implement bank account hosted URL verification with webhook handling notification

* Fix tests

* Run dotnet format

* Remove unused VerifyBankAccount operation

* Stephon's feedback

* Removing unused test

* TEMP: Add logging for deployment check

* Run dotnet format

* fix test

* Revert "fix test"

This reverts commit b8743ab3b5.

* Revert "Run dotnet format"

This reverts commit 5c861b0b72.

* Revert "TEMP: Add logging for deployment check"

This reverts commit 0a88acd6a1.

* Resolve GetPaymentMethodQuery order of operations
2025-09-09 12:22:42 -05:00
Vijay Oommen
8b30c33eae PM-25413 no badRequest result because of error from Onyx (#6285) 2025-09-04 12:54:24 -05:00
Alex Morask
c503ecbefc [PM-21827] Implement mechanism to suspend currently unpaid providers (#6119)
* Manually suspend provider and set cancel_at when we receive 'suspend_provider' metadata update

* Run dotnet format'
2025-07-24 11:50:09 -05:00
Stephon Brown
76d1a2e875 [PM-23287] Enable Provider When Subscription Is Paid (#6113)
* test : add tests for provider update

* feat: add provider update logic and dependencies

* fix: remove duplicate dependencies

* refactor: updated switch logic for helper method

* test: add feature flag to tests

* feat: add feature flag for changes
2025-07-24 11:46:16 -04:00
Alex Morask
829c3ed1d7 [PM-21821] Provider portal takeover states (#6109)
* Add feature flag

* Disable provider and schedule cancellation when subscription goes unpaid

* Run dotnet format

* Only set provider subscription cancel_at when subscription is going from paid to unpaid

* Update tests
2025-07-23 08:25:37 -05:00
Vijay Oommen
9a97384670 [PM-23575] Use the input text as question and avoid additional call to freshdesk (#6073) 2025-07-10 08:34:45 -05:00
Alex Morask
18d146406c [PM-21099] (NO LOGIC) Organize Billing provider code (#5819)
* [NO LOGIC] Organize Billing provider code

* Run dotnet format

* Run dotnet format'

* Fixed using after merge

* Fixed test usings after merge
2025-05-21 09:04:30 -04:00
Vijay Oommen
4195baf1c5 [PM-20980] Add a note to freshdesk ticket when no user is found (#5768) 2025-05-13 09:05:22 -05:00
Jonas Hendrickx
f8e89f1747 [PM-18170] Remove PM-15814-alert-owners-of-reseller-managed-orgs (#5412) 2025-04-09 07:53:43 +02:00
cyprain-okeke
e53e701097 Initial commit (#5612) 2025-04-07 11:32:38 +01:00
Alex Morask
a2e665cb96 [PM-16684] Integrate Pricing Service behind FF (#5276)
* Remove gRPC and convert PricingClient to HttpClient wrapper

* Add PlanType.GetProductTier extension

Many instances of StaticStore use are just to get the ProductTierType of a PlanType, but this can be derived from the PlanType itself without having to fetch the entire plan.

* Remove invocations of the StaticStore in non-Test code

* Deprecate StaticStore entry points

* Run dotnet format

* Matt's feedback

* Run dotnet format

* Rui's feedback

* Run dotnet format

* Replacements since approval

* Run dotnet format
2025-02-27 07:55:46 -05:00
Alex Morask
9c0f9cf43d [PM-18221] Update credited user's billing location when purchasing premium subscription (#5393)
* Moved user crediting to PremiumUserBillingService

* Fix tests
2025-02-12 09:00:52 -05:00
Conner Turnbull
f8b65e0477 Removed all usages of FluentAssertions (#5378) 2025-02-06 16:46:23 -05:00
Vijay Oommen
17f5c97891 PM-6939 - Onyx Integration into freshdesk controller (#5365) 2025-02-06 08:13:17 -06:00
renovate[bot]
94761a8c7b [deps] Billing: Update FluentAssertions to v7 (#5127)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-10 15:21:26 -05:00
renovate[bot]
fd7ff2ac63 [deps] Billing: Update FluentAssertions to 6.12.2 (#5015)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com>
2024-11-25 14:30:02 -05:00
Jonas Hendrickx
25afd50ab4 [PM-14798] Update ProviderEventService for multi-organization enterprises (#5026) 2024-11-12 14:53:34 +01:00
renovate[bot]
bee83724a3 [deps] Billing: Update FluentAssertions to 6.12.1 (#4817)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 09:41:33 +02:00
Alex Morask
dd6bc89b19 Upgrade Stripe.net to 45.7.0 (#4744) 2024-09-06 13:30:39 -04:00
Alex Morask
a51e4c0a7c Used PO ID instead of Org ID on accident (#4500) 2024-07-11 11:22:15 -04:00
Alex Morask
07d37b1b41 [AC-2805] Add AssignedSeats to ProviderOrganizationOrganizationDetailsView (#4446)
* Add 'AssignedSeats' to ProviderOrganizationOrganizationDetailsView

* Add newline

* Thomas' feedback
2024-07-03 10:33:37 -04:00
Alex Morask
95f54b616e [AC-2744] Add provider portal pricing for consolidated billing (#4210)
* Expanded Teams and Enterprise plan with provider seat data

* Updated provider setup process with new plan information

* Updated provider subscription retrieval and update with new plan information

* Updated client invoice report with new plan information

* Fixed tests

* Fix broken test
2024-06-24 11:16:57 -04:00
Conner Turnbull
b5241f1a97 Added missing enum import (#4192) 2024-06-14 17:05:19 -04:00
Alex Morask
83604cceb1 [AC-1943] Implement provider client invoice report (#4178)
* Update ProviderInvoiceItem SQL configuration

* Implement provider client invoice export

* Add tests

* Run dotnet format

* Fixed SPROC backwards compatibility issue
2024-06-14 12:26:49 -04:00
cyprain-okeke
f73b7c7fa8 [AC-2706] [Defect] ProviderId does not populate when payment for provider subscription is created/updated (#4138)
* Resolve the issue of not updating the db

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

* Resolve the failing test

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>

---------

Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
2024-05-29 18:49:19 +01:00
Conner Turnbull
5e4c5acc48 Removed the need to verify requests as CloudOps added an ACL on the network (#3882) 2024-03-11 10:03:10 -04:00
Conner Turnbull
2dc068a983 [AC-2239] fix automatic tax errors (#3834)
* Ensuring customer has address before enabling automatic tax

* StripeController fixes

* Refactored automatic tax logic to use customer's automatic tax values

* Downgraded refund error in paypal controller to be a warning

* Resolved broken test after downgrading error to warning

* Resolved broken paypal unit tests on windows machines

---------

Co-authored-by: Lotus Scott <148992878+lscottbw@users.noreply.github.com>
2024-03-05 13:04:26 -05:00
Alex Morask
6cc53b4739 Fix PayPal IPN Logging (#3768)
* Remove request logging, fix txn_id correlation

* Respond 400 when txn_id is missing

* More cleanup
2024-02-08 15:37:41 +00:00
Alex Morask
2ad4bb8a79 [AC-1980] Upgrade Stripe.net (#3596)
* Upgrade Stripe.net

* Don't process mismatched version webhooks

* Manually handle API mismatch in Stripe webhook

* Pivot webhook secret off webhook version
2024-01-31 08:19:29 -05:00
Alex Morask
cc2a81ae3f [AC-1800] PayPal IPN Refactor (#3619)
* Add more logging to PayPal IPN webhook

* Add PayPalIPNClient tests

* Add PayPalControllerTests

---------

Co-authored-by: aelinton <95626935+aelinton@users.noreply.github.com>
2024-01-30 09:03:50 -05:00
Matt Bishop
890a09804f Stop using lockfiles (#3550) 2023-12-12 09:09:42 -05:00
renovate[bot]
43eea0d297 [deps] Billing: Update Braintree to v5.21.0 (#3537)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 14:46:39 -05:00
renovate[bot]
62bf2a146f [deps] Tools: Update MailKit to v4.3.0 (#3533)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 18:21:26 +01:00
renovate[bot]
baafbe4576 [deps] Tools: Update SendGrid to v9.28.1 (#3534)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 18:07:33 +01:00
renovate[bot]
3e323ae3d9 [deps] Platform: Update dotnet monorepo to v6.0.25 (#3507)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 12:04:13 -05:00
renovate[bot]
3ecec808b6 [deps] Billing: Update Serilog.Extensions.Logging.File to v3 (#3069)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 11:54:20 -05:00
github-actions[bot]
26e6093c14 Bumped version to 2023.12.0 (#3519)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2023-12-05 10:55:20 -05:00
renovate[bot]
b05bdbac01 [deps] SM: Update Dapper to v2.1.24 (#3482)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 16:36:54 -06:00
renovate[bot]
333a51b3f2 [deps] Tools: Update Handlebars.Net to v2.1.4 (#3508)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 12:02:30 +01:00
renovate[bot]
85df9716d8 [deps] SM: Update EntityFrameworkCore (#3494)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 16:49:15 -06:00
Thomas Rittson
9021236d61 AC Team code ownership moves: Organization pt. 1 (#3472)
* move Organization.cs files to AC Team code ownership
2023-11-28 17:18:08 -06:00