Paypal is now working

This commit is contained in:
Godwin
2014-07-24 21:12:39 -06:00
parent 5352749e68
commit 534b9303e9
11 changed files with 133 additions and 77 deletions
@@ -0,0 +1,5 @@
- if @registration && @registration.is_participant && @registration.complete && @registration.payment_info.present?
- info = YAML.load(@registration.payment_info)
%h3=_'registration.payment_confirm.title','Please confirm your payment'
.columns
%p=_'registration.payment_confirm.help',"You are about to confirm your payment of #{number_to_currency(info[:amount], :unit => '$')} USD for registration.", vars: {:amount => number_to_currency(info[:amount], :unit => '$')}
@@ -4,14 +4,24 @@
.columns
- if !@registration.is_participant
%p=_'registration.thanks.all_done.volunteer','Thanks for submitting your volunteer infomation. We\'ll see you at Bike!Bike!'
- elsif @registration.payment_info.nil?
- elsif @registration.registration_fees_paid.nil?
%p=_'registration.thanks.all_done.please_pay',"Thank you for completing your registration. We'll see you at Bike!Bike! If you have not already done so, we ask that you pay the registration donation as soon as you can."
= form_tag ("#{@conference.url}/register/pay-registration/#{@registration.confirmation_token}/").gsub(/\/\/+/, '/'), :method => :post, :class => 'row' do
= form_tag ("#{@conference.url}/register/pay-registration/#{@registration.confirmation_token}/").gsub(/\/\/+/, '/'), :method => :post do
= hidden_field_tag :confirmation_token, @registration.confirmation_token
.columns.small-4.small-offset-2
= number_field_tag :payment_amount, 25.00, :step => 0.01, :min => 0.01
.columns.small-4.end
= form_actions :submit_payment
.row
.columns.small-12.centered
%p=_'registration.thanks.all_done.please_pay.currency','(amounts are in $USD)'
%button{name: 'auto_payment_amount', type: 'submit', value: '25.0', :class => 'good'}
= number_to_currency(25, :unit => '$')
%button{name: 'auto_payment_amount', type: 'submit', value: '50.0', :class => 'better'}
= number_to_currency(50, :unit => '$')
%button{name: 'auto_payment_amount', type: 'submit', value: '100.0', :class => 'best'}
= number_to_currency(100, :unit => '$')
.row
.columns.small-12.centered
.small-form
= number_field_tag :payment_amount, :step => 0.01, :min => 0.01, :label => false
= form_actions :custom_amount
- else
%p=_'registration.thanks.all_done.paid',"You're all done and paid up! We'll see you in #{city}.", vars: {:city => city}
%p=_'register.email.registration_confirmed.info',"We'll have housing, loaner bikes, and food arranged for your arrival. If you have any other questions or concerns, please email bikebike2014columbus@gmail.com."