Finished creating sample app

This commit is contained in:
2013-04-30 02:42:53 -07:00
parent 067ebd998f
commit 00b09ac0fb
10 changed files with 276 additions and 64 deletions
+20 -1
View File
@@ -1,5 +1,24 @@
<h1>New payment</h1>
<%= render 'form' %>
<% 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 %>
+14
View File
@@ -4,6 +4,20 @@
<b>Profile:</b>
<%= @payment.profile %>
</p>
<p>
<b>Status:</b> <%= @paypal_result['STATUS'] %><br/>
<b>Last Payment Date:</b> <%= @paypal_result['LASTPAYMENTDATE'] %><br/>
<b>Last Payment Amount:</b> <%= @paypal_result['LASTPAYMENTAMT'] %>
</p>
<p>
<b># Payments Complete:</b><%= @paypal_result['NUMCYCLESCOMPLETED'] %><br/>
<b>Start date:</b> <%= @paypal_result['PROFILESTARTDATE'] %><br/>
<b>Next Billing date:</b> <%= @paypal_result['NEXTBILLINGDATE'] %><br/>
<b>Total Amount paid:</b> <%= @paypal_result['REGULARAMTPAID'] %>
</p>
<p>
<b>PayPal Timestamp:</b> <%= @paypal_result['TIMESTAMP'] %>
</p>
<%= link_to 'Edit', edit_payment_path(@payment) %> |