|
1 | 1 | <% if @selected_plan.nil? %> |
| 2 | + <% cents_due_now = 0 %> |
2 | 3 | <div class="card teal lighten-1 white-text" style="padding: 20px;"> |
3 | 4 | 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. |
4 | 5 | </div> |
5 | 6 | <% 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> |
11 | 36 | </div> |
12 | 37 | <% end %> |
13 | 38 |
|
|
0 commit comments