Commit Graph

89 Commits

Author SHA1 Message Date
David Taylor 12cac3827c
DEV: Update linting (#247) 2024-11-20 18:34:34 +01: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
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
Isaac Janzen e365ced531
DEV: Use angle bracket syntax (#167) 2023-05-28 09:32:27 -05:00
Mark Reeves 7bc34bbbb4
FIX: A few more syntax fixes for button actions (#162) 2023-05-08 10:36:11 -04:00
Mark Reeves 9aa4a44b2a
FIX: Fix syntax for some buttons following recent updates (#159) 2023-05-03 15:50:20 -04:00
Isaac Janzen c06ae37048
DEV: Use angle bracket syntax (#158) 2023-05-02 09:24:28 -05:00
David Taylor 7fb0936e5c
DEV: Update eslint-config-discourse, use prettier for hbs (#146) 2023-01-04 13:39:58 +01:00
David Taylor d4d92d9653
DEV: Use closure actions (#127) 2022-07-06 00:20:12 +01:00
discoursebot 9a9b5a79c1
DEV: Update CI setup and fix linting issues (#119)
* DEV: Update CI workflows
* DEV: Update deps
* DEV: Fix template linting

Co-authored-by: discoursebuild <build@discourse.org>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2022-06-11 12:54:30 +02:00
Jarek Radosz 21d71e09fc
DEV: Fix linting errors (#83)
Template lint errors and broken rubocop linting.
2021-07-04 21:53:55 +02:00
Justin DiRose f596a0f78a
FEATURE: Campaigns (#67)
Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>

See https://github.com/discourse/discourse-subscriptions/pull/67 for the full description.
2021-06-02 13:15:03 -05:00
Justin DiRose a282475da3
FEATURE: Admin > Subscriptions Pagination (#50)
Meta topic: https://meta.discourse.org/t/subscriptions-add-pagination-to-admin-subscriptions-view/172500

This adds support for pagination using our `{{load-more}}` component in core. Implementation on the backend was a bit tricky because we don't return all results from Stripe, only those that match local subscriptions stored in the `DiscourseSubscriptions::Subscription` model.
2021-02-05 11:57:53 -06:00
Justin DiRose 072b558d40
FEATURE: Give option to repurchase products multiple times (#46)
Feature requested here: https://meta.discourse.org/t/subscriptions-allow-users-to-purchase-one-time-products-multiple-times/173732/

There may be cases where a site admin wants to allow the repurchasing of a product. This implements the functionality by adding a repurchaseable toggle in the admin screen when creating a product. This saves an attribute to the Stripe product metadata.

When a user has already purchased an item with this toggle enabled, they will be able to purchase it again when browsing to `/s`.
2021-01-31 14:17:44 -06:00
Justin DiRose 400313cded
FEATURE: Allow creation of coupons in admin panel (#43)
Adds full support to create coupon/promo codes in the Admin > Plugins > Subscriptions section of the plugin. The Create Coupon button opens a form on the same page, and the active checkboxes toggle the active status of the coupon code.
2021-01-13 11:47:22 -06:00
Justin DiRose d430098bad
FIX: Properly allow no group to be selected (#33) 2020-11-24 14:52:00 -06:00
Justin DiRose b92627677f
FEATURE: Implement refunds from dashboard (#27)
An implementation of refunds from the Admin dashboard. To refund, go to Plugins > Subscriptions > Subscriptions then click the `Cancel` button. You'll be presented with a modal. If you wish to refund only the most recent payment, check the box. 

This only implements refunds for Subscriptions, not One Time Payments. One Time Payments will still need to be handled manually at this time.
2020-10-29 10:31:12 -05:00
Justin DiRose 954beeb094
FIX: Properly show information on saved plans 2020-07-28 11:56:58 -05:00
Justin DiRose 0a244111bc
FIX: Buttons out of alignment on some browsers 2020-07-28 11:49:15 -05:00
Justin DiRose 587661fafb
FEATURE: Allow one-time purchases on products (#18)
Building off the foundation of using the Prices API, this PR adds the ability to create a one-time purchase plan for any product, which then can add a user to the specified plan group.

Some things to be aware of:

    One-time purchases cannot have trials.
    One-time purchases use the Invoice API instead of Subscriptions. Invoices are created then charged immediately.
    Users should receive emails for these invoices directly from Stripe just like subscriptions.
2020-07-22 11:06:34 -05:00
Justin DiRose c9ff55b46a
REFACTOR: Use the Prices API in place of Plans (#17)
Stripe has a newer API called Prices where you can create a price for any product and it can either be recurring or one-time. The easy part is existing Plans work with the Prices API by passing a Plan ID, but objects are returned in the slightly-different Prices API object format.

This commit is a refactor to the new API to handle the data in its new form, and lays the foundation for a one time payment plan to be added to any subscriptions product.
2020-07-15 08:44:40 -05:00
Justin DiRose 9c46794e80
DEV: Remove deprecations & improve error handling (#12)
- Replace deprecated methods on client
- Fix broken dropdowns due to select kit 2 upgrade
- Graceful error handling when Stripe keys are not configured but plugin enabled
2020-05-28 10:32:57 -05:00
Rimian Perkins 48c606908a disable billing interval when cannot change 2020-03-21 20:30:30 +11:00
Rimian Perkins 49ac965b24 tidy some scss class names etc 2019-12-18 08:47:01 +11:00
Rimian Perkins 09bfe419d8 set new product inactive by default 2019-12-05 17:07:26 +11:00
Rimian Perkins 21b8340f4f rename the translations 2019-12-04 09:29:13 +11:00
Rimian Perkins 382fd4ac41 name space the js admin 2019-12-02 18:58:14 +11:00
Rimian Perkins 709aebb593 set the currency in the plan 2019-11-30 16:39:28 +11:00
Rimian Perkins 7580b68711 rm extra line in product page 2019-11-29 10:16:00 +11:00
Rimian Perkins 298e70b32a delete customer record 2019-11-28 20:44:38 +11:00
Rimian Perkins 3e4fd76891 show product and plan nickname in admin 2019-11-26 12:55:49 +11:00
Rimian Perkins b3b7d88481 spinner on subscription cancel 2019-11-14 14:07:45 +11:00
Rimian Perkins 6590d8051c delete subscriptions in admin 2019-11-14 10:51:04 +11:00
Rimian Perkins 5fdd81ac77 link to user admin 2019-11-13 15:27:32 +11:00
Rimian Perkins 8aed6b8d30 add link to user 2019-11-13 14:21:21 +11:00
Rimian Perkins dafa08f43e disable dashboard 2019-11-07 12:09:40 +11:00
Rimian Perkins e3ac6f7dac date format and product description 2019-11-01 12:30:19 +11:00
Rimian Perkins 5fe08c110f format some currency 2019-10-31 14:35:19 +11:00
Rimian Perkins b0a4665bf4 set the dollar amount 2019-10-31 13:29:11 +11:00
Rimian Perkins ced4d1c786 format the amount in admin 2019-10-31 11:41:01 +11:00
Rimian Perkins 87c83abcd3 add basic invoices page 2019-10-28 14:05:58 +11:00
Rimian Perkins eead6fd345 user group specs. help page 2019-10-24 15:48:03 +11:00
Rimian Perkins 603ddc354b plan can be active or not 2019-10-24 10:02:31 +11:00
Rimian Perkins 922dee581c fix bugs in create plans 2019-10-23 15:55:06 +11:00
Rimian Perkins a94287434d plans have group names 2019-10-23 11:50:54 +11:00
Rimian Perkins bb1e330f68 eslint rm & old files 2019-10-23 10:36:12 +11:00
Rimian Perkins fb37c200cd more info on subscription page 2019-10-23 10:30:04 +11:00
Rimian Perkins c6bf9ca4d3 fix trial period 2019-10-23 10:16:17 +11:00
Rimian Perkins 296d5eff1b destroy plan 2019-10-22 19:32:36 +11:00
Rimian Perkins 5cce5f2b84 format dates for plan and product list 2019-10-22 16:35:41 +11:00