Check Out

<% cache @cart do %> <%= render :partial => '/tb_commerce/carts/cart', :locals => {:editable => false, :cart => tb_commerce_current_cart} %> <% end %>

Step 2: Enter your billing information. <%= link_to 'Copy info from shipping', '#', :data => {:order => @order.to_json}, :class => 'copy-shipping-info' %>.

<%= tb_form_for @credit_card, :url => '#', :data => {:api => tb_commerce_api_transactions_path, :success => tb_commerce_order_path(@order)} do |f| %> <%= f.tb_text_field :card_number, :data => {:stripe => 'number'} %> <%= f.tb_text_field :card_ccv, :data => {:stripe => 'cvc'} %> <%= f.tb_date_select :card_expiration, {:prompt => true, :discard_day => true, :order => [:month, :year, :day], :start_year => Date.today.year, :end_year => Date.today.year + 10, :add_month_numbers => true} %> <%= f.tb_text_field :billing_name, :data => {:stripe => 'name'} %> <%= f.tb_text_field :billing_address, :data => {:stripe => 'address_line1'} %> <%= f.tb_text_field :billing_address_2, :data => {:stripe => 'address_line2'} %> <%= f.tb_text_field :billing_city, :data => {:stripe => 'address_city'} %> <%= f.tb_form_group do %> <%= f.tb_label :billing_country %>
<%= f.country_select :billing_country, {:priority_countries => ['US', 'CA'], :prompt => 'Select Country', :selected => 'US'}, :class => 'form-control country-select', :data => {:api => tb_commerce_api_states_path, :state => 'tb_commerce_order_state', :stripe => 'address_country'} %>
<% end %> <%= f.tb_select :billing_state, [], {:prompt => 'Select State'}, :data => {:stripe => 'address_state'} %> <%= f.tb_text_field :billing_postal, :data => {:stripe => 'address_zip'} %> <%= f.tb_form_group do %>
<%= f.submit 'Place My Order', :class => 'btn btn-primary', :data => {:disable_with => 'Placing Order...'} %>
<% end %> <% end %>