<%- if Rails.env.development? submit_url = Spree::Paypal::Config[:sandbox_url] else submit_url = Spree::Paypal::Config[:paypal_url] end %> <%= form_tag submit_url do %> <%- if(Order.use_encrypted_paypal_link?) %> <%= hidden_field_tag(:cmd, "_s-xclick") %> <%= hidden_field_tag(:encrypted, @order.paypal_encrypted(payment_notifications_url(:secret => Spree::Paypal::Config[:ipn_secret]))) %> <% else %> <% @order.line_items.each_with_index do |item, index| %> <%- if item.variant.respond_to?(:paypal_name) %> <% else %> <% end %> <% end %> <% if(Spree::Paypal::Config[:populate_address] && @order.bill_address) %> <% end %> <% end %> <%= image_submit_tag "pp_checkout.gif" %> <% end -%>