Module: PaymentRecipes::PayPal::REST::Settings

Defined in:
lib/payment_recipes/paypal/rest/settings.rb

Class Method Summary collapse

Class Method Details

.configure(live: false, client_id:, client_secret:) ⇒ Object


5
6
7
8
9
10
11
12
13
14
# File 'lib/payment_recipes/paypal/rest/settings.rb', line 5

def self.configure(live: false, client_id:, client_secret:)
  mode = live ? "live" : "sandbox"

  ::PayPal::SDK.configure(
    :mode => mode,
    :client_id => client_id,
    :client_secret => client_secret,
    :ssl_options => { } 
  )
end