Class: Moneytree::Oauth::StripeController

Inherits:
ApplicationController show all
Defined in:
app/controllers/moneytree/oauth/stripe_controller.rb

Instance Method Summary collapse

Instance Method Details

#callbackObject



8
9
10
11
12
13
# File 'app/controllers/moneytree/oauth/stripe_controller.rb', line 8

def callback
  # TODO: Remove this module prefix once we figure out how to properly autoload this.
  payment_gateway = Moneytree::PaymentGateway.create!(psp: 'stripe', account: )
  payment_gateway.oauth_callback(payment_gateway_params)
  redirect_to Moneytree.oauth_redirect, notice: 'Connected to Stripe'
end

#newObject



4
5
6
# File 'app/controllers/moneytree/oauth/stripe_controller.rb', line 4

def new
  redirect_to stripe_oauth_url
end