Subscription

<% if @subscription.present? %> <% if @next_plan.present? %>

Upgrade to the <%= @next_plan.name %>

<%= plan_cost(@next_plan) %>

<% if current_customer.card.present? %> <%= link_to 'Upgrade', account_subscription_path(plan: @next_plan), method: :patch %> <% else %> <%= link_to 'Upgrade', edit_account_subscription_path(plan: @next_plan) %> <% end %> <% end %>

Current Plan

You're currently paying <%= plan_cost(@subscription.plan) %> on the <%= @subscription.plan.name %>.

<% if current_customer.card.present? %> <%= link_to 'Change Payment Details', account_card_path %> <% else %> <%= link_to 'Add Payment Details', new_account_card_path %> <% end %>

Plans

<% else %> <% if @next_plan.present? %>

Upgrade to the <%= @next_plan.name %>

<%= plan_cost(@next_plan) %>

<% if current_customer.card.present? %> <%= link_to 'Upgrade', account_subscription_path(plan: @next_plan), method: :post %> <% else %> <%= link_to 'Upgrade', new_account_subscription_path(plan: @next_plan) %> <% end %> <% end %>

Current Plan

You're currently on the <%= Tang.free_plan_name %>.

<% if current_customer.card.present? %> <%= link_to 'Change Payment Details', account_card_path %> <% else %> <%= link_to 'Add Payment Details', new_account_card_path %> <% end %>

Plans

<% end %>