diff options
Diffstat (limited to 'billing/app/controllers/subscriptions_controller.rb')
-rw-r--r-- | billing/app/controllers/subscriptions_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/billing/app/controllers/subscriptions_controller.rb b/billing/app/controllers/subscriptions_controller.rb index af20faf..9633830 100644 --- a/billing/app/controllers/subscriptions_controller.rb +++ b/billing/app/controllers/subscriptions_controller.rb @@ -23,4 +23,9 @@ class SubscriptionsController < ApplicationController @result = Braintree::Subscription.create( :payment_method_token => params[:payment_method_token], :plan_id => params[:plan_id] ) end + def destroy + # TODO add permission check + @result = Braintree::Subscription.cancel params[:id] + end + end |