Commit Graph
1056 Commits
Author SHA1 Message Date
Blake EricksonandJarek Radosz eecb17698f FIX: Redirect to the pricing table page when enabled (#239)
If the pricing table is enabled the `/s` route should redirect to the
pricing table route and vice versa.

Co-authored-by: Jarek Radosz <[email protected]>
2024-10-02 17:53:20 -06:00
Jarek Radosz 937d099692 DEV: Prefix all test names (#238) 2024-09-18 01:49:28 +02:00
dependabot[bot] ef820ca2e0 Bump micromatch from 4.0.5 to 4.0.8 (#237)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 12:32:55 +02:00
dependabot[bot] f1b9c967c3 Bump rexml from 3.3.3 to 3.3.6 (#229)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.3 to 3.3.6.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.3.3...v3.3.6)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 15:02:37 -06:00
Discourse Translator Bot dd846ae87d Update translations (#235) 2024-08-29 15:01:43 -06:00
Blake Erickson 9c5ec86de7 DEV: Guest payments follow up (#236)
Just some minor follow up changes to PR #234
2024-08-29 14:49:03 -06:00
Blake Erickson fa5e95860b DEV: Fetch related guest payments (#234) 2024-08-28 21:51:34 -06:00
Blake Erickson 700c5e7727 FIX: Payments not showing up for users (#233)
Pricing table payments for one off purchases need to be attached to the
customer or they don't show up on the user's billing payments page.
2024-08-28 15:03:22 -06:00
Blake Erickson a2c70deeff FIX: Create customer for one off pricing table purchases (#232)
When using the Stripe Pricing Table for one-off purchases
(non-subscription) stripe doesn't automatically create a customer
record. This was causing the pricing table webhook
endpoint to end prematurely and not add users to their appropriate
group after purchase. Now if we detect that there is no customer record
we will make an api call to Stripe to create one.
2024-08-28 11:27:55 -06:00
Blake Erickson 71643a023d DEV: Use warn instead of info for Rails logger (#231)
Follow up to: e92dd39928
2024-08-28 09:17:08 -06:00
Blake Erickson e92dd39928 DEV: Add verbose logging site setting (#230)
To aid in debugging I'm adding a verbose logging site setting. I'm
adding this because I'm currently getting some errors in production that
I'm unable to replicate locally.

See: https://meta.discourse.org/t/323450/4
2024-08-27 18:40:12 -06:00
Blake Erickson f0b4984cee FIX: Pricing table for one-off purchases (#228)
When using the Stripe Pricing table for one-off purchases
(non-subscriptions) the webhook was encountering an error because it was
expecting subscription information which does not exist for one-off
purchases. This fix addresses that issue ensuring that no errors occur,
that users are added to the appropriate group, and that uses can see
their purchase on the billing page.
2024-08-20 13:32:32 -06:00
Discourse Translator Bot 52cae7b1a9 Update translations (#227) 2024-08-13 16:32:20 +02:00
dependabot[bot] 0f52101f2e Bump rexml from 3.2.8 to 3.3.3 (#226)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.8 to 3.3.3.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.8...v3.3.3)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 13:20:22 +02:00
Natalie Tay 2824f955c2 DEV: Pin plugin for Discourse < 3.4.0.beta1-dev (#225) 2024-08-02 17:12:58 +08:00
Discourse Translator Bot bb96d77056 Update translations (#224) 2024-07-31 00:15:07 +02:00
Blake Erickson 41c443ab23 FIX: Decimal point truncation (#223)
Amounts like $45.80 were being displayed as $45.8. Which doesn't look
correct for currency.

Bug Report: https://meta.discourse.org/t/316007
2024-07-19 07:18:28 -06:00
Discourse Translator Bot 403c966514 Update translations (#221) 2024-07-16 22:14:17 +02:00
Blake Erickson 572aa0f4a9 FIX: Exception with campaign refresh data job (#222)
Depending on the invoices in stripe there could be some nil values for
things so we need to account for those in this job or an exception will
be thrown causing the job to fail.
2024-07-16 11:54:56 -06:00
Blake Erickson c02193943b FIX: Admins unable to cancel a subscription for a user (#220) 2024-07-12 14:33:04 -06:00
Discourse Translator Bot 0fca89a1f7 Update translations (#219) 2024-07-09 23:12:43 +02:00
Blake Erickson 3cc113973f FEATURE: Site Setting to enable automatic tax (#218)
FEATURE: Site Setting to enable automatic tax

There is now a new site setting called
`discourse_subscriptions_enable_automatic_tax` that can be enabled if
you would like to automatically compute tax rates on all new
subscriptions.
2024-07-08 13:22:02 -06:00
dependabot[bot] a3b4521a76 Bump braces from 3.0.2 to 3.0.3 (#217)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 22:31:59 +02:00
Discourse Translator Bot e9817406f1 Update translations (#216) 2024-05-31 12:30:13 +02:00
Loïc Guitaut 381e866009 DEV: Update rubocop-discourse to version 3.8.0 (#215) 2024-05-28 11:52:36 +02:00
Ted Johansson 804f5303f4 FIX: Add missing transaction error translation (#214) 2024-05-24 18:27:00 +08:00
dependabot[bot] cac4bdd4ff Bump rexml from 3.2.6 to 3.2.8 (#213)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.6 to 3.2.8.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.6...v3.2.8)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-17 00:02:28 +02:00
Blake Erickson 542af4cf16 FIX: Campaign banner should link to pricing table when enabled (#212)
If the new pricing table is enabled the campaign banner should link to
the pricing table route.
2024-05-15 11:44:27 -06:00
Discourse Translator Bot 512f37a1d3 Update translations (#211) 2024-05-14 16:20:09 +02:00
Blake Erickson d63c84eca5 FIX: One-time purchase pending invoice item (#210)
This change ensures we attach the invoice item to the invoice to avoid
any occurrences of an empty invoice being paid with pending invoice
items.
2024-05-07 08:57:37 -06:00
Blake Erickson e132913db4 FIX: Login required for Stripe Checkout (#209)
If an anonymous user tries to subscribe we need to show them a log in
message first. We currently don't have support for anonymous
subscriptions.
2024-05-03 17:01:51 -06:00
Blake Erickson 5eba613f8f FIX: Prevent duplicate stripe subscription list requests (#208)
Users can have multiple customer records in our db, so we need to filter
out non-unique stripe customer ids before fetching subscriptions for each.
2024-05-03 12:38:26 -06:00
Blake Erickson 66e8857c20 DEV: Stop deleting customers on cancel (#207)
Instead of deleting customers on cancel we will now update the
subscription status to canceled. This way we can have some visibility on
which users have canceled.
2024-05-02 13:38:30 -06:00
Discourse Translator Bot aaa4baec8a Update translations (#205) 2024-04-30 21:57:46 +02:00
Blake Erickson b1920caf7d FIX: Auto-Create Support Campaign button (#206)
The Auto-Create Support Campaign button was just showing an infinite "is
loading" spinner so you couldn't even click on it.

This fix allows the button to work again and only show the loading
spinner when it is actually loading.

See: https://meta.discourse.org/t/discourse-subscriptions/140818/653?u=blake
2024-04-30 09:27:04 -06:00
Blake Erickson 7ee0b696ba FIX: Update cc save button missing (#204) 2024-04-30 06:00:55 -06:00
Blake Erickson 6f54494a3b FIX: Allow active status for updated webhook (#203)
Likely there was an API change at some point now that we are using the
latest version of the stripe API. When the
`customer.subscription.updated` webhook is called we should also accept
the status of "active".
2024-04-29 15:50:05 -06:00
Blake Ericksonandspirobel 45754baa00 FEATURE: Add new stripe based pricing table (#202)
This commit adds an optional new stripe based pricing table.
If the user is logged in, the email field will be prepopulated with the users email.

The pricing table can be configured in the stripe dashboard.

Once the discourse_subscriptions_pricing_table setting is filled with the pricing table embed code from the stripe dashboard,
the pricing table will be displayed on /s/subscriptions

For more details see https://stripe.com/docs/payments/checkout/pricing-table
---------

Co-authored-by: spirobel <[email protected]>
2024-04-29 12:47:58 -06:00
Blake Erickson dcde03d7c4 DEV: Bump stripe gem (#200)
Upgrading to the latest stripe gem and api version.
2024-04-16 11:28:07 -06:00
Michelle Bueno Saquetim Vendrame d63f241e0d FEATURE: add ZAR currency support (#199) 2024-04-15 21:26:26 +02:00
Discourse Translator Bot 8f1b332f9e Update translations (#198) 2024-04-02 18:20:05 +02:00
Blake Erickson 9190001a3c FIX: Translation missing for Norway (#196)
Turns out in YAML `NO` is interpreted as a boolean value, so we need to
wrap it in quotes.
2024-03-27 15:50:15 -06:00
Natalie Tay 0d28c9a56d FIX: Ensure deletion of product upon confirmation (#195)
Ensure deletion of product upon confirmation
2024-03-13 17:16:07 +08:00
David Taylor 7361721ec0 DEV: Update for strict-dynamic CSP (#194) 2024-03-06 16:45:55 +00:00
Loïc Guitaut 87659e237b DEV: Fix new Rubocop offenses 2024-03-06 15:23:55 +01:00
Selase Krakani 7b8a41ad0d DEV: Pin plugin for Discourse < 3.3.0.beta1-dev (#192) 2024-02-29 13:59:04 -07:00
Discourse Translator Bot 0dcf17de59 Update translations (#191) 2024-01-30 17:04:52 +01:00
Discourse Translator Bot 2cfded9a77 Update translations (#190) 2024-01-23 18:30:34 +01:00
Jarek Radosz d33cf2921e DEV: Update linting (#189) 2024-01-16 17:51:44 +01:00
David Taylor a3883d2a9a DEV: Resolve registerUnbound deprecation (#188) 2024-01-15 11:52:19 +00:00