summaryrefslogtreecommitdiff
path: root/engines/billing/app/views/subscriptions/show.html.haml
diff options
context:
space:
mode:
authorazul <azul@leap.se>2015-10-19 11:19:43 +0200
committerazul <azul@leap.se>2015-10-19 11:19:43 +0200
commit04302654c223dba1c9a06922afaa7462966ea122 (patch)
treeedd493015ce03bb1fb80cc61aa3076fdf8fc467f /engines/billing/app/views/subscriptions/show.html.haml
parentc2cc1a48a4faeff4088cdf5f56e6b0382acfb346 (diff)
parent8abadb0fe7618e978d9d297ce62fb6c0228c7191 (diff)
Merge pull request #198 from claucece/develop
Braintree_implementation
Diffstat (limited to 'engines/billing/app/views/subscriptions/show.html.haml')
-rw-r--r--engines/billing/app/views/subscriptions/show.html.haml26
1 files changed, 19 insertions, 7 deletions
diff --git a/engines/billing/app/views/subscriptions/show.html.haml b/engines/billing/app/views/subscriptions/show.html.haml
index 246ebf0..45c54cc 100644
--- a/engines/billing/app/views/subscriptions/show.html.haml
+++ b/engines/billing/app/views/subscriptions/show.html.haml
@@ -1,7 +1,19 @@
-%h1
- - if @subscription.status == 'Active'
- Current
- Subscription
-= render :partial => "subscription_details", :locals => {:subscription => @subscription}
-- if allow_cancel_subscription(@subscription)
- = destroy_btn :cancel_subscription, user_subscription_path(@user, @subscription.id), type: 'danger'
+%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" }
+ });