<% cart_errors = ecommerce_verify_cart_errors(@cart) %> <% if cart_errors.present? %> <%= content_tag :div, cart_errors.join('
').html_safe, class: 'alert alert-danger' %> <% else %> <% if @cart.free_cart? %>
<%= link_to(t('.complete_order', default: 'Complete Order'), plugins_ecommerce_checkout_complete_free_order_url, class: 'btn btn-primary col-md-4 col-md-offset-4') %>
<% else %>
<% (payment_methods = current_site.payment_methods.actives.all).each_with_index do |payment, index| %> <% inputs = content_tag :div do %>
<% end %>
" role="tabpanel" aria-labelledby="heading<%= payment.id %>">

<%= payment.description.translate %>

<% if payment.options[:type] == 'paypal' %>
Buy now with PayPal <%= form_tag(plugins_ecommerce_checkout_pay_by_paypal_path(order: @cart.slug), :method => "post") do %> <%= inputs %> <% end %>
<% end %> <% if payment.options[:type] == 'bank_transfer' %> <%= form_tag(plugins_ecommerce_checkout_pay_by_bank_transfer_path(order: @cart.slug), :method => "post") do %>
  • <%= t('.account_number', default: 'Account Number') %>: <%= payment.options[:bank_transfer_number_account] %>
  • <%= t('.details_transfer', default: 'Details') %>: <%= payment.options[:bank_transfer_detail].to_s.translate %>
<%= inputs %> <% end %> <% end %> <% if payment.options[:type] == 'on_delivery' %> <%= form_tag(plugins_ecommerce_checkout_pay_by_on_delivery_path(order: @cart.slug), :method => "post") do %> <%= inputs %> <% end %> <% end %> <% if payment.options[:type] == 'credit_card' %> Buy now with Credit Card <% end %> <% if payment.options[:type] == 'authorize_net' %> Buy now with Authorize.net <%= form_tag(plugins_ecommerce_checkout_pay_by_authorize_net_path(order: @cart.slug), :method => "post") do %>
<%= inputs %> <% end %> <% end %> <% if payment.options[:type] == 'stripe' %> <%= form_tag(plugins_ecommerce_checkout_pay_by_stripe_path(order: @cart.slug), :method => "post") do %> Buy now with Authorize.net

<% end %> <% end %> <% if(custom_method = ecommerce_custom_payment_methods[payment.options[:type].to_sym]).present? %> <%= render custom_method[:payment_form_view_path], payment: payment, options: payment.options, cart: @cart %> <% end %>
<% end %> <%= content_tag(:div, 'No Payment Methods Defined', class: 'alert alert-danger') unless payment_methods.any? %>
<% end %> <% end %>