Created
March 14, 2013 09:20
-
-
Save thomasstr/5160006 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h2>Ny ordre</h2> | |
<%= content_tag('div', "There was an error processing your payment: #{@paypal_error}", :class => 'error') if @paypal_error %> | |
<%= simple_form_for @cc, :as => :creditcard, :url => { :action => 'credit' } do |f| %> | |
<p>Use the card number provided by your Sandbox account while testing</p> | |
<label>Card Number</label> | |
<%= f.input :number %> | |
<label>Card Type</label> | |
<%= f.select :brand, Purchase::PAYMENT_TYPES %> | |
<label>Expiration</label> | |
<%= f.select :month, (1 .. 12) %> | |
<%= f.select :year, (Time.now.year .. 10.years.from_now.year) %> | |
<label>CVV</label> | |
<%= f.input :verification_value, :size => 4 %> | |
<label>Name on Card (first, last)</label> | |
<%= f.input :first_name %> | |
<%= f.input :last_name %> | |
<label>Billing Address</label> | |
<label>Name</label> | |
<%= text_field_tag 'billing_address[name]' %> | |
<label>Street</label> | |
<%= text_field_tag 'billing_address[address1]' %> | |
<%= text_field_tag 'billing_address[address2]' %> | |
<label>City</label> | |
<%= text_field_tag 'billing_address[city]' %> | |
<label>State</label> | |
<%= text_field_tag 'billing_address[state]' %> | |
<label>Country</label> | |
<%= text_field_tag 'billing_address[country]' %> | |
<label>Zip</label> | |
<%= text_field_tag 'billing_address[zip]' %> | |
<label>Phone</label> | |
<%= text_field_tag 'billing_address[phone]' %> | |
<br/> | |
<%= submit_tag 'Purchase eBook' %> | |
<% end %> | |
<p> | |
...or by PayPal | |
</p> | |
<%= form_tag :action => 'express' do %> | |
<input type="image" src="<%= image_path('paypal.gif') %>"> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment