ruby-paypal-example/app/views/payments/new.html.erb

25 lines
724 B
Plaintext

<h1>New payment</h1>
<% if @payment.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@payment.errors.count, "error") %> prohibited this payment from being saved:</h2>
<ul>
<% @payment.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<%= form_tag('https://www.sandbox.paypal.com/cgi-bin/webscr', {:method => 'post', :authenticity_token => false } ) do %>
<%= hidden_field_tag 'cmd', "_express-checkout" %>
<%= hidden_field_tag 'token', @token %>
<%= submit_tag 'Subscribe Via PayPal', {:id => 'submit_subscription_request', :name => 'submit'} %>
<% end %>
<%= link_to 'Back', payments_path %>