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.2"
Class Method Summary
collapse
Class Method Details
.clear_configuration ⇒ Object
29
30
31
|
# File 'lib/simple_payment.rb', line 29
def clear_configuration
@gateway = nil
end
|
24
25
26
27
|
# File 'lib/simple_payment.rb', line 24
def configure(options)
@gateway = options[:gateway]
@gateway = SimplePayment::Test::Gateway if @gateway == :test
end
|
.gateway ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/simple_payment.rb', line 16
def gateway
if @gateway.respond_to?(:new)
@gateway.new
else
@gateway
end
end
|