summaryrefslogtreecommitdiff
path: root/billing/app/views/payments/new.html.haml
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-03-12 14:18:18 -0700
committerAzul <azul@leap.se>2013-07-17 10:46:25 +0200
commit925534524317d0b6e7786d5a891e2b462b897d0a (patch)
tree64450146472c00fef0a3079537c37e4ea62a7a15 /billing/app/views/payments/new.html.haml
parent3ffac4e77a118ee6ec7d369b0250c11830c2f7e0 (diff)
Replace .erb with .haml files.
Diffstat (limited to 'billing/app/views/payments/new.html.haml')
-rw-r--r--billing/app/views/payments/new.html.haml25
1 files changed, 25 insertions, 0 deletions
diff --git a/billing/app/views/payments/new.html.haml b/billing/app/views/payments/new.html.haml
new file mode 100644
index 0000000..9b06050
--- /dev/null
+++ b/billing/app/views/payments/new.html.haml
@@ -0,0 +1,25 @@
+%h1
+ Payment: $#{h @amount}
+- if @result
+ %div{:style => "color: red;"}
+ = h @result.errors.size
+ error(s)
+= form_for :transaction, :params => @result && @result.params[:transaction], :errors => @result && @result.errors.for(:transaction), :builder => BraintreeHelper::BraintreeFormBuilder, :url => Braintree::TransparentRedirect.url, :html => {:autocomplete => "off"} do |f|
+ = field_set_tag "Customer" do
+ = f.fields_for :customer do |c|
+ %div= c.label :first_name, "First Name"
+ %div= c.text_field :first_name
+ %div= c.label :last_name, "Last Name"
+ %div= c.text_field :last_name
+ %div= c.label :email, "Email"
+ %div= c.text_field :email
+ = field_set_tag "Credit Card" do
+ = f.fields_for :credit_card do |c|
+ %div= c.label :number, "Number"
+ %div= c.text_field :number
+ %div= c.label :expiration_date, "Expiration Date (MM/YY)"
+ %div= c.text_field :expiration_date
+ %div= c.label :cvv, "CVV"
+ %div= c.text_field :cvv
+ = hidden_field_tag :tr_data, Braintree::TransparentRedirect.transaction_data(:redirect_url => confirm_payment_url,:transaction => {:type => "sale", :amount => @amount})
+ = f.submit "Submit" \ No newline at end of file