Class: CatarsePaypalExpress::Gateway
- Inherits:
-
Object
- Object
- CatarsePaypalExpress::Gateway
- Includes:
- ActiveMerchant::Billing::Integrations
- Defined in:
- lib/catarse_paypal_express/gateway.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(configuration = PaymentEngines.configuration) ⇒ Gateway
constructor
A new instance of Gateway.
- #setup_gateway ⇒ Object
Constructor Details
#initialize(configuration = PaymentEngines.configuration) ⇒ Gateway
Returns a new instance of Gateway.
5 6 7 |
# File 'lib/catarse_paypal_express/gateway.rb', line 5 def initialize configuration = PaymentEngines.configuration @configuration = configuration end |
Class Method Details
.instance ⇒ Object
9 10 11 12 13 |
# File 'lib/catarse_paypal_express/gateway.rb', line 9 def self.instance new.setup_gateway rescue Exception => e puts e. end |
Instance Method Details
#setup_gateway ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/catarse_paypal_express/gateway.rb', line 15 def setup_gateway check_default_configurations! ActiveMerchant::Billing::PaypalExpressGateway.new({ login: @configuration[:paypal_username], password: @configuration[:paypal_password], signature: @configuration[:paypal_signature] }) end |