blob: d284e78992a4f3fee2466ec7b826cf192691d3cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class SubscriptionController < ApplicationController
before_filter :authorize
def new
customer = Customer.find_by_user_id(current_user.id)
braintree_customer = Braintree::Customer.find(customer.braintree_customer_id)
payment_method_token = customer.default_credit_card.token
@result = Braintree::Subscription.create( :payment_method_token => payment_method_token, :plan_id => "ttw2" ) #todo obviously don't hardcode payment id
debugger
end
def confirm
end
end
|