Class: Yukon::PaymentGateway

Inherits:
Object
  • Object
show all
Defined in:
lib/yukon/payment_gateway.rb

Class Method Summary collapse

Class Method Details

.create(seller_email) ⇒ Object

Pre-requisite - Rails app must configure the login, password and signature in config/initializers/yukon.rb

Argument : seller_email : Email address of the seller

Returns ActiveMerchant::Billing::PaypalExpressGateway object



12
13
14
15
16
17
18
19
20
21
# File 'lib/yukon/payment_gateway.rb', line 12

def self.create(seller_email)
  options = {
    login:     Yukon.,
    password:  Yukon.password,
    signature: Yukon.signature,
    subject:   seller_email
  }
  ActiveMerchant::Billing::Base.mode = Yukon.mode
  ActiveMerchant::Billing::PaypalExpressGateway.new(options)
end