Files
discourse-subscriptions/assets/javascripts/discourse/templates/s/show.hbs
T
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

45 lines
898 B
Handlebars

<div class="discourse-subscriptions-section-columns">
<div class="section-column discourse-subscriptions-confirmation-billing">
<h2>
{{model.product.name}}
</h2>
<hr>
<p>
{{model.product.description}}
</p>
</div>
<div class="section-column">
{{#unless model.product.subscribed}}
<h2>
{{i18n 'discourse_subscriptions.subscribe.card.title'}}
</h2>
<hr>
{{payment-options
plans=model.plans
selectedPlan=selectedPlan
}}
<hr>
{{subscribe-card cardElement=cardElement}}
{{#if loading}}
{{loading-spinner}}
{{else}}
{{d-button
disabled=loading
action="stripePaymentHandler"
class="btn btn-primary btn-payment"
label="discourse_subscriptions.plans.payment_button"
}}
{{/if}}
{{/unless}}
</div>
</div>