<% content_for :javascript do %>
  <%= javascript_include_tag "https://checkout.stripe.com/checkout.js" %>
  <%= javascript_tag do %>
    var handler = StripeCheckout.configure({
      key: "<%= Rails.configuration.stripe[:publishable_key] %>",
      image: "<%= image_path 'logo-stripe.png' %>",
      name: "Trailmix",
      description: "Monthly subscription",
      amount: 399,
      panelLabel: "{{amount}} a month",
      allowRememberMe: false,
      token: function(token) {
        $("#stripe_card_id").val(token.id);
        $("#sign-up-form").submit();
      }
    });

    $("#sign-up-button").on("click", function(e) {
      e.preventDefault();

      handler.open({
        email: $("#email").val()
      });
    });
  <% end %>
<% end %>

<% content_for :javascript do %>
  <%= javascript_include_tag "https://checkout.stripe.com/checkout.js" %>
  <%= javascript_tag do %>
    var handler = StripeCheckout.configure({
      key: "<%= Rails.configuration.stripe[:publishable_key] %>",
      image: "<%= image_path 'logo-stripe.png' %>",
      name: "Trailmix",
      description: "Monthly subscription with trial",
      amount: 399,
      panelLabel: "{{amount}} after 14-day trial",
      allowRememberMe: false,
      token: function(token) {
        $("#stripe_card_id").val(token.id);
        $("#sign-up-form").submit();
      }
    });

    $("#sign-up-button").on("click", function(e) {
      e.preventDefault();

      handler.open({
        email: $("#email").val()
      });
    });
  <% end %>
<% end %>

Update Stripe button to show 14-day trial
Update Stripe button to show 14-day trial
