Module: SimplePayment

Defined in:
lib/simple_payment.rb,
lib/simple_payment/version.rb,
lib/simple_payment/test/gateway.rb,
lib/simple_payment/test/request.rb,
lib/simple_payment/test/response.rb,
lib/simple_payment/models/payment.rb,
lib/simple_payment/braintree/gateway.rb,
lib/simple_payment/braintree/request.rb,
lib/simple_payment/braintree/response.rb,
lib/simple_payment/models/transaction.rb,
lib/simple_payment/transmission_error.rb

Defined Under Namespace

Modules: Braintree, Test Classes: Payment, Transaction, TransmissionError

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.clear_configurationObject



25
26
27
# File 'lib/simple_payment.rb', line 25

def clear_configuration
  @gateway = nil
end

.configure(options) ⇒ Object



20
21
22
23
# File 'lib/simple_payment.rb', line 20

def configure(options)
  @gateway = options[:gateway]
  @gateway = SimplePayment::Test::Gateway if @gateway == :test
end

.gatewayObject



16
17
18
# File 'lib/simple_payment.rb', line 16

def gateway
  @gateway.new
end