Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change how billing are calculated #336

Conversation

jog1t
Copy link
Contributor

@jog1t jog1t commented Sep 21, 2024

Closes CON-70

TL;DR

Updated billing calculations and display for game plans.

What changed?

  • Added a total field to the GameBillingContextValue interface
  • Updated GameBillingPlans component to use dynamic pricing from PRICE_MAP
  • Modified GameBillingSummary to display the total bill instead of overage
  • Introduced PRICE_MAP in billing-calculate-usage.ts for plan pricing
  • Updated calculateUsedCredits function to include total bill calculation

How to test?

  1. Navigate to the game billing section
  2. Verify that the pricing for Indie and Studio plans is correctly displayed
  3. Check that the "Current bill total" in the billing summary shows the correct total (base plan price + overage)
  4. Test different usage scenarios to ensure the total bill is calculated correctly

Why make this change?

This change improves the accuracy and clarity of billing information for users. By introducing dynamic pricing and displaying the total bill (including the base plan price), users can better understand their current charges and make informed decisions about their subscription plans.

Copy link

cloudflare-workers-and-pages bot commented Sep 21, 2024

Deploying hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: cc680c9
Status: ✅  Deploy successful!
Preview URL: https://f7dea2dc.hub-3av.pages.dev
Branch Preview URL: https://09-21-fix-change-how-billing.hub-3av.pages.dev

View logs

Copy link

graphite-app bot commented Sep 21, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link

linear bot commented Sep 21, 2024

CON-70

@jog1t jog1t force-pushed the 09-21-fix_change_how_billing_are_calculated branch from 7415e72 to cc680c9 Compare September 25, 2024 22:26
Copy link

graphite-app bot commented Sep 26, 2024

Merge activity

  • Sep 26, 2:41 AM EDT: jog1t added this pull request to the Graphite merge queue.
  • Sep 26, 2:43 AM EDT: CI is running for this PR on a draft PR: #366
  • Sep 26, 2:45 AM EDT: jog1t merged this pull request with the Graphite merge queue via draft PR: #366.

jog1t added a commit that referenced this pull request Sep 26, 2024
Closes CON-70

### TL;DR

Updated billing calculations and display for game plans.

### What changed?

- Added a `total` field to the `GameBillingContextValue` interface
- Updated `GameBillingPlans` component to use dynamic pricing from `PRICE_MAP`
- Modified `GameBillingSummary` to display the total bill instead of overage
- Introduced `PRICE_MAP` in `billing-calculate-usage.ts` for plan pricing
- Updated `calculateUsedCredits` function to include total bill calculation

### How to test?

1. Navigate to the game billing section
2. Verify that the pricing for Indie and Studio plans is correctly displayed
3. Check that the "Current bill total" in the billing summary shows the correct total (base plan price + overage)
4. Test different usage scenarios to ensure the total bill is calculated correctly

### Why make this change?

This change improves the accuracy and clarity of billing information for users. By introducing dynamic pricing and displaying the total bill (including the base plan price), users can better understand their current charges and make informed decisions about their subscription plans.
@graphite-app graphite-app bot closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants