Commit Graph

268 Commits

Author SHA1 Message Date
Justin DiRose da9b58398b
FEATURE: Support for coupons in checkout (#41)
This adds support for Stripe Promo Codes in the user checkout process. 

Also adds a discounted field to User > Billing > Subscriptions to show the amount or percent discounted.

This does not currently add in support for creating promo codes in the Subscriptions interface (that will come at a later point in time). Instead a coupon can be created with a promo code right from the Stripe dashboard.
2021-01-07 15:25:44 -06:00
Discourse Translator Bot 0b5f740db5
Update translations (#35) 2020-12-01 14:33:30 +01:00
Discourse Translator Bot 52817018aa
Update translations (#32) 2020-11-24 17:21:39 +01:00
Discourse Translator Bot e2485b58a1
Update translations (#31) 2020-11-03 18:06:40 +01: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 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
Discourse Translator Bot 8ffe769ca9 Update translations 2020-10-27 15:34:26 +01:00
Justin DiRose 3a5078ded6
REFACTOR: Simplify controller setup (#24)
The code in the plugin needed a dramatic cleanup. This refactor collapses the Plan/Product/Subscription controllers on the backend into one new controller: `SubscribeController`.

This reduces N+1 calls to the back end during the subscription process and simplifies use of the code. 

I've also removed a bunch of dead code and refactored some logic into methods for easier readability. No feature/functionality changes in this commit; only refactoring. However, refactoring will allow for implementation of better anonymous user handling, so this is largely a foundation to enable making that change.
2020-10-21 13:36:31 -05:00
Discourse Translator Bot 0bae17dcb6 Update translations 2020-10-20 15:31:51 +02:00
Justin DiRose e13221279d
FIX: Loading state persists after bad card entered (#22)
* FIX: Loading state persists after bad card entered

If a bad card number was entered and the subscribe button clicked, the
subscription button still disappeared and subscribing was not possible
without refreshing the page.

* UX: Add missing tooltip

* DEV: Ignore gems directory for local rubocop runs
2020-10-19 20:54:30 -05:00
Discourse Translator Bot 866e485c1c Update translations 2020-10-06 15:16:49 +02:00
Discourse Translator Bot 60b6181f0e Update translations 2020-09-29 13:03:03 +00:00
Discourse Translator Bot 99758a256e Update translations 2020-09-22 13:06:48 +00:00
Justin DiRose d60c5b6d54
UX: fix incorrect text on cancel button 2020-09-16 09:49:45 -05:00
Justin DiRose bdcaaf9897
UX: i18ninize string 2020-09-16 09:44:44 -05:00
Discourse Translator Bot 8022b3c15a Update translations 2020-09-16 10:20:57 +00:00
Discourse Translator Bot aef967192d Update translations 2020-09-15 13:07:07 +00:00
Discourse Translator Bot 772de6ff10 Update translations 2020-08-25 13:03:24 +00:00
Justin DiRose a868e6b838
FEATURE: Cancel payments at end of subscription vs immediately
Previously, when a user canceled a subscription, the access would revoke
immediately on Discourse vs. at the end of the billing period. This
commit changes the behavior to remove membership at the end of the
billing period using Stripe's `cancel_at_period_end` attribute on the
Subscription object.

This commit now requires the setup of webhooks for subscription
processing to occur correctly.
2020-08-19 14:37:47 -05:00
Discourse Translator Bot 91824dcdae Update translations 2020-08-18 13:04:16 +00:00
Discourse Translator Bot 484fc1eb2f Update translations 2020-08-11 13:06:23 +00:00
Discourse Translator Bot cc1e11850d Update translations 2020-08-05 13:30:17 +00:00
Justin DiRose 83002fab3c
FEATURE: New styling of product page 2020-07-28 12:46:59 -05:00
Justin DiRose 9e66588038
FIX: Missing translation for daily subscriptions 2020-07-27 10:37:41 -05:00
Justin DiRose 9491f558ea
FEATURE: Add support for 3D Secure payments (#19)
Adds an additional checkout flow to support authentication of payment methods.
2020-07-24 15:07:18 -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 fb4f50478d
REFACTOR: Use engine to load files, add constraint (#14) 2020-07-06 11:11:04 -05:00
Justin DiRose 88f36c18a6
FEATURE: Add BRL currency support 2020-06-30 10:13:05 -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
Raj Rathore 53a11872ef fix(coding-style): linting changes reverted to be consistent with existing style 2020-04-23 17:11:00 +05:30
Raj Rathore 30299a5f13 fix(currency-symbol): hard-coded dollar symbol removed 2020-04-23 16:06:02 +05:30
Raj Rathore 40a390c3eb merge remote-tracking branch 'upstream/master' 2020-04-23 15:42:13 +05:30
SidV b2931cacb1
Create client.es.yml 2020-04-20 22:23:36 -03:00
SidV 4dbfb232eb
Create server.es.yml 2020-04-20 22:01:41 -03:00
Raj Rathore f91b257198 feat(currency-inr): inr added to supported currencies 2020-04-16 01:57:56 +05:30
Rimian Perkins 125cdab24e add NZ dollar 2020-03-31 09:46:56 +11:00
iunctis.fr c82f1ce141
Améliorations
Sur la page de paiement
2020-03-16 01:16:11 +01:00
iunctis.fr ced756c0fb
Create server.fr.yml 2020-03-16 00:31:04 +01:00
iunctis.fr 5def8b4002
Create client.fr.yml 2020-03-16 00:30:14 +01:00
Rimian Perkins b83da467d0 respond to incomplete payment 2020-01-14 18:46:48 +11:00
Rimian Perkins 0543b3a6a3 basic hook 2020-01-13 11:10:06 +11:00
Rimian Perkins 431279a4f7 Add empty webhook url and upgrade stripe gem 2020-01-10 10:24:09 +11: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 92f6569f9f fix broken paths 2019-12-16 14:10:25 +11:00
Rimian Perkins 55f4592033 subscription and billing templates 2019-12-16 10:42:55 +11:00
Rimian Perkins 8264930e92 user activity link to payments 2019-12-13 13:44:25 +11:00
Rimian Perkins 53ed40bfc3 fix api routes and eslint 2019-12-13 12:29:34 +11:00
Rimian Perkins 57fb508514 buttons for selecting price and one time payment 2019-12-13 10:41:14 +11:00
Rimian Perkins 831e64317b refactor models, routes and buttons 2019-12-12 12:59:26 +11:00
Rimian Perkins 41b0667350 fix rubocop newer version 2019-12-12 09:59:38 +11:00
Rimian Perkins ff1740d035 validate plan 2019-12-10 10:55:24 +11:00
Rimian Perkins 1c31884475 show the plans in the buttons proper 2019-12-09 12:01:10 +11:00
Rimian Perkins 09bfe419d8 set new product inactive by default 2019-12-05 17:07:26 +11:00
Rimian Perkins 80b721ddd8 rename some settings 2019-12-04 11:53:05 +11:00
Rimian Perkins b397ba5a68 name space module 2019-12-04 11:23:45 +11:00
Rimian Perkins 95a263535e rename server translation 2019-12-04 09:33:39 +11:00
Rimian Perkins 21b8340f4f rename the translations 2019-12-04 09:29:13 +11:00
Rimian Perkins 08cbff0c1c change engine mount point and base path in jsapp 2019-12-03 10:29:44 +11:00
Rimian Perkins 382fd4ac41 name space the js admin 2019-12-02 18:58:14 +11:00
Rimian Perkins ad77fc749b test subcription deletes 2019-11-29 08:15:46 +11:00
Rimian Perkins ca00b530aa show the product name in subscription lists 2019-11-27 10:48:30 +11:00
Rimian Perkins 3e4fd76891 show product and plan nickname in admin 2019-11-26 12:55:49 +11:00
Rimian Perkins 7340bf5bc5 fix customer id not found 2019-11-26 11:09:54 +11:00
Rimian Perkins 3999e1f7fd style the product page a bit 2019-11-14 11:13:12 +11:00
Rimian Perkins 6590d8051c delete subscriptions in admin 2019-11-14 10:51:04 +11:00
Rimian Perkins 8aed6b8d30 add link to user 2019-11-13 14:21:21 +11:00
Rimian Perkins 4a812ceff6 toggle the subscribe button 2019-11-06 20:43:16 +11:00
Rimian Perkins e14b4dcd96 the subscribe product page 2019-11-04 16:37:21 +11:00
Rimian Perkins 2b3c52bdd4 name space user subscription request 2019-11-01 13:43:09 +11:00
Rimian Perkins e3ac6f7dac date format and product description 2019-11-01 12:30:19 +11:00
Rimian Perkins 86c77a7395 rubocop && fix i18n 2019-11-01 10:50:34 +11:00
Rimian Perkins 5fe08c110f format some currency 2019-10-31 14:35:19 +11:00
Rimian Perkins ced4d1c786 format the amount in admin 2019-10-31 11:41:01 +11:00
Rimian Perkins dbaa30ba18 user cancels subscription 2019-10-31 10:01:41 +11:00
Rimian Perkins 03cbc235b1 list customer subscriptions 2019-10-30 14:19:43 +11:00
Rimian Perkins ee0901aeca delete subscription 2019-10-29 14:35:07 +11:00
Rimian Perkins 2a985ae554 fix subscribe request 2019-10-29 14:15:13 +11:00
Rimian Perkins 7edb0fe39b list subscriptions 2019-10-29 11:43:32 +11:00
Rimian Perkins 5a7097b774 billing/subscriptions 2019-10-28 14:48:59 +11:00
Rimian Perkins 87c83abcd3 add basic invoices page 2019-10-28 14:05:58 +11:00
Rimian Perkins 570ef2fbb4 use the billing page 2019-10-25 13:55:57 +11:00
Rimian Perkins 9e981c3dae whoops translation 2019-10-25 13:18:18 +11:00
Rimian Perkins 6fbcea2cf3 product controller 2019-10-25 08:18:16 +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 fb37c200cd more info on subscription page 2019-10-23 10:30:04 +11:00
Rimian Perkins 5cce5f2b84 format dates for plan and product list 2019-10-22 16:35:41 +11:00
Rimian Perkins c26ce1fc80 plans are child of product 2019-10-22 15:45:51 +11:00
Rimian Perkins c6dd47d328 templates, plans 2019-10-21 15:28:45 +11:00
Rimian Perkins b05b03e25b fix up forms and requests to plan api 2019-10-17 20:34:26 +11:00
Rimian Perkins 01b78b31df subscriptions list 2019-10-16 21:29:40 +11:00
Rimian Perkins c845f3be4b form fields 2019-10-16 21:18:29 +11:00
Rimian Perkins 496f2b9706 save the product 2019-10-16 14:15:01 +11:00
Rimian Perkins e2f1f0f523 destroy plans 2019-10-16 11:22:58 +11:00
Rimian Perkins 1bedc1ba2f destroy products 2019-10-15 23:14:04 +11:00
Rimian Perkins 23cb6ef93e create the products 2019-10-15 21:50:30 +11:00
Rimian Perkins e51aa5f6f0 products admin route and basic pages 2019-10-15 13:18:25 +11:00