107 Commits

Author SHA1 Message Date
Jarek Radosz
d6eaba632d
DEV: Lose the es6 suffix (#112) 2022-03-07 00:20:03 +01:00
David Taylor
fa490337ef
FIX: Ensure sidebar class is removed when component destroyed (#111) 2022-02-28 11:51:29 +00:00
Justin DiRose
5ead25feb6
REFACTOR: Rename s to subscribe (#86) 2021-07-19 19:56:19 -05:00
Justin DiRose
6414a1f6e5
FEATURE: Show/hide campaign banner with goal status (#85) 2021-07-15 15:05:27 -05: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
eee1adc40f
FIX: New user sessions redirected weirdly on login-required sites (#80) 2021-06-22 10:04:02 -05:00
Jordan Vidrine
beb73b58f3
FEATURE: Add fireworks + gradient animation to campaign success banner (#77) 2021-06-21 09:01:35 -05:00
Jordan Vidrine
787c5550c6
FEATURE: Add ability to use custom background image (#76)
* FEATURE: Add ability to use custom background image

* Prettier
2021-06-18 10:20:54 -05:00
Jordan Vidrine
a4f36e4966
Campaign topic footer (#72)
* UX: Restyle banner, add topic footer functionality, other updates
2021-06-10 16:02:54 -05: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
7f84cee940
UX: Improve usability of purchase page (#54)
Commit does 3 things:

    Remove the duplicative currency abbreviation in favor of the currency symbol alone
    Reorders plans by the cost in ascending order.
    Fixes a flexbox button bug
2021-02-16 12:07: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
1ad5b17640
FEATURE: Better UX for anonymous users (#25)
Improves the subscription flow for anonymous users by making the routes available, and showing a login button. Clicking login from this page will save a `destination_url` cookie so that when logging in they're redirected back to the subscription page they were at.
2020-10-28 13:30:26 -05:00
Justin DiRose
7e753d45bd
DEV: Update to new prettier standards 2020-09-16 09:53:50 -05:00
Justin DiRose
739296bc72
FIX: Single subscription was not correctly selected 2020-08-03 10:31:21 -05:00
Justin DiRose
a1a7ca98a3
DEV: Fix tests 2020-07-28 15:40:16 -05:00
Justin DiRose
83002fab3c
FEATURE: New styling of product page 2020-07-28 12:46:59 -05:00
Justin DiRose
954beeb094
FIX: Properly show information on saved plans 2020-07-28 11:56:58 -05:00
Justin DiRose
11d9b2e011
FIX: If only one plan, automatically select it 2020-07-28 11:08:21 -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
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
9176471551 toggle single payments allowed setting 2019-12-17 21:14:13 +11:00
Rimian Perkins
52db93ecd8 user payments page 2019-12-17 16:31:58 +11:00
Rimian Perkins
57fb508514 buttons for selecting price and one time payment 2019-12-13 10:41:14 +11:00
Rimian Perkins
86bc9bb3e6 rm redundant action 2019-12-10 10:15:30 +11:00
Rimian Perkins
d3eed3546d test button click 2019-12-06 14:33:38 +11:00
Rimian Perkins
2ce314fc8d initial payment buttons component 2019-12-06 13:52:03 +11:00
Rimian Perkins
80b721ddd8 rename some settings 2019-12-04 11:53:05 +11:00
Rimian Perkins
370566b570 only show subscribe buttons when logged in 2019-11-14 09:47:15 +11:00
Rimian Perkins
fcfb826929 create the token and make the customer request 2019-10-11 12:26:01 +11:00
Rimian Perkins
bb31deae89 basic subscribe page 2019-10-10 13:52:55 +11:00
Rimian Perkins
5d94ed8974 redirect to show page with payment id 2019-09-14 18:31:11 +10:00
Rimian Perkins
c90d4b2f8e fix params 2019-09-13 14:34:06 +10:00
Rimian Perkins
4287e8aa5d load model 2019-09-13 13:52:41 +10:00
Rimian Perkins
404bede398 fix snake case 2019-09-13 13:46:32 +10:00
Rimian Perkins
cb9af7c258 send the current user 2019-09-13 12:35:38 +10:00
Rimian Perkins
035187d843 pretty js 2019-09-12 17:47:44 +10:00
Rimian Perkins
ba73e688f2 validate billing 2019-09-12 17:47:08 +10:00
Rimian Perkins
9b69c58be4 Add some billing details 2019-09-12 15:13:08 +10:00
Rimian Perkins
c79541a48b pretty 2019-09-12 11:51:28 +10:00
Rimian Perkins
7ad42c9b48 combo box with amounts. use decimals 2019-09-12 11:21:27 +10:00
Rimian Perkins
55bab5d936 rm redundant component 2019-09-12 09:28:01 +10:00
Rimian Perkins
36c1731565 add success handler 2019-09-12 07:43:27 +10:00
Rimian Perkins
fdd4d1ed5f yarn prettier 2019-09-12 07:14:16 +10:00
Rimian Perkins
11b2917254 eslint 2019-09-11 22:17:07 +10:00
Rimian Perkins
a9434f5723 load in components 2019-09-11 20:37:23 +10:00
Rimian Perkins
ee2be672f7 initial components 2019-09-11 20:19:50 +10:00
Rimian Perkins
78914e0511 Add new plugin files.
This gets the plugin running again without name collisions. A solid starting point
2019-09-11 13:19:07 +10:00
Rimian Perkins
6d1c4dd28c deprecations and documentation 2019-08-28 19:02:56 +10:00