summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/payments/new.html.haml
blob: 67018b2cb00c320b3ce4cdbe802cf4dfda488594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
%h2.mbs
  = t(:new_donation)
%br/
= form_tag confirm_payment_path, id: "checkout-form" do
  - if current_user and !current_user.has_payment_info?
    = render 'customer_form' unless current_user.is_anonymous?
  %p
    = t(:donation_info)
  %div{:id => "payment-form" }
  %div{:id => "coinbase-container-id" }
  %input{:name => "amount", :placeholder => "#{t(:donation_amount)}", :type => "text"}
    %input.btn.btn-primary{:type => "submit", :value => "#{t(:donate)}"}
%script{:src => "https://js.braintreegateway.com/v2/braintree.js"}
:javascript
  var clientToken = "#{@client_token}";
  braintree.setup(clientToken, "dropin", {
    container: "payment-form",
    form: "checkout-form",
    coinbase: { container: "coinbase-container-id" }
  });