summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/subscriptions/show.html.haml
blob: 45c54cc835ea73c772218a4c2ae510659c3b12d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
%script{:src => "https://js.braintreegateway.com/v2/braintree.js"}
%h2.mbs
  = t(:new_subs)
= simple_form_for :subscription, :url => subscribe_subscription_path(@plan.id), :id => "checkout-form" do |f|
  - if current_user and !current_user.has_payment_info?
    = render 'customer_form'
  %br/
  %p
    =t(:pay_details)
  #payment-form
  #coinbase-container-id
  .form-actions
    = f.submit t(:subscribe), :class => 'btn btn-primary'
  :javascript
    var clientToken = "#{@client_token}";
    braintree.setup(clientToken, "dropin", {
    container: "payment-form",
    coinbase: { container: "coinbase-container-id" }
    });