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.
17 lines
451 B
Handlebars
17 lines
451 B
Handlebars
{{#ds-button
|
|
action="planClick"
|
|
selected=selected
|
|
class="btn-discourse-subscriptions-subscribe"
|
|
}}
|
|
<div class="interval">
|
|
{{#if recurringPlan}}
|
|
{{i18n (concat "discourse_subscriptions.plans.interval.adverb." plan.recurring.interval)}}
|
|
{{else}}
|
|
{{i18n "discourse_subscriptions.one_time_payment"}}
|
|
{{/if}}
|
|
</div>
|
|
<span class="amount">
|
|
{{format-currency plan.currency plan.amountDollars}}
|
|
</span>
|
|
{{/ds-button}}
|