Sha256: aa9b603d37b30dc3753ff42c39fe76af76e9f89e600996dc5edce1e953011138

Contents?: true

Size: 1.73 KB

Versions: 1

Compression:

Stored size: 1.73 KB

Contents

<%= form_for(subscription, url: url, html: { id: 'payment-form' }) do |f| %>
  <% if subscription.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(subscription.errors.count, "error") %> prohibited this subscription from being saved:</h2>
      <ul>
      <% subscription.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <%= f.hidden_field :plan, value: subscription.plan.id %>

  <h2><%= subscription.plan.name %></h2>
  <h3><%= plan_cost(subscription.plan) %></h3>

  <span class="payment-errors"></span>

  <div class="form-row">
    <label>
      <span>Cardholder name</span>
      <input type="text" data-stripe="name" autocomplete="cc-name" required>
    </label>
  </div>

  <div class="form-row">
    <label>
      <span>Card number</span>
      <input type="tel" size="20" data-stripe="number" autocomplete="cc-number" placeholder="•••• •••• •••• ••••" required>
    </label>
  </div>

  <div class="form-row">
    <label>
      <span>Expiration (MM/YY)</span>
      <input type="tel" size="5" data-stripe="exp" autocomplete="cc-exp" placeholder="•• / ••" required>
    </label>
  </div>

  <div class="form-row">
    <label>
      <span>CVC</span>
      <input type="tel" size="4" data-stripe="cvc" autocomplete="off" placeholder="•••" required>
    </label>
  </div>

  <div class="form-row">
    <label>
      <span>Zip code</span>
      <input type="tel" data-stripe="address_zip" autocomplete="postal-code" required>
    </label>
  </div>

  <!-- <input type="text" name="stripe_token" id="stripe_token"> -->

  <div class="actions">
    <%= f.submit 'Submit Payment', class: 'submit' %>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tang-0.0.1 app/views/tang/account/subscriptions/_form.html.erb