Skip to content

Commit b5eb89a

Browse files
committed
Enable 3mo and annual subscriptions #migration
1 parent 3a0617b commit b5eb89a

3 files changed

Lines changed: 356 additions & 284 deletions

File tree

app/views/subscriptions/information.html.erb

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
11
<% if @selected_plan.nil? %>
2+
<% cents_due_now = 0 %>
23
<div class="card teal lighten-1 white-text" style="padding: 20px;">
34
Saving a payment method allows you to freely switch between Notebook.ai subscription plans with ease. Your information is stored securely in our payment processing provider, Stripe, and will not be shared with any other parties.
45
</div>
56
<% else %>
6-
<div class="card teal lighten-3" style="padding: 20px;">
7-
You are signing up for Notebook.ai's <strong><%= @selected_plan.name %></strong> plan,
8-
which enables creating every type of content available.
9-
On it, you will be charged <%= number_to_currency(@selected_plan.monthly_cents / 100) %>, billed monthly.
10-
In order to get started, we need to collect your payment information below.
7+
<%
8+
case @selected_plan.stripe_plan_id
9+
when 'premium'
10+
cents_due_now = 900
11+
service_length = 'one month'
12+
bill_frequency = 'month'
13+
when 'premium-trio'
14+
cents_due_now = 2500
15+
service_length = 'three months'
16+
bill_frequency = '3 months'
17+
when 'premium-annual'
18+
cents_due_now = 9900
19+
service_length = 'twelve months'
20+
bill_frequency = 'year'
21+
end
22+
%>
23+
24+
<div class="card light-blue lighten-3">
25+
<div class="card-content">
26+
<p>
27+
You are signing up for Notebook.ai's <strong><%= @selected_plan.name %></strong> plan.
28+
29+
You will be charged <%= number_to_currency(cents_due_now / 100.0) %> now
30+
for <%= service_length %> of membership, renewing every <%= bill_frequency %>.
31+
</p>
32+
<p>
33+
In order to get started, we need to collect your payment information below.
34+
</p>
35+
</div>
1136
</div>
1237
<% end %>
1338

0 commit comments

Comments
 (0)