Class: Spree::Conekta::Provider
- Defined in:
- lib/spree/conekta/provider.rb
Constant Summary
Constants inherited from Client
Client::CHARGE_ENDPOINT, Client::CONEKTA_API, Client::PAYMENT_SOURCES
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#source_method ⇒ Object
Returns the value of attribute source_method.
Instance Method Summary collapse
- #authorize(amount, method_params, gateway_options = {}) ⇒ Object
- #capture(amount, method_params, gateway_options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Provider
constructor
A new instance of Provider.
Methods inherited from Client
#connection, #headers, #payment_processor, #post
Constructor Details
#initialize(options = {}) ⇒ Provider
Returns a new instance of Provider.
5 6 7 8 |
# File 'lib/spree/conekta/provider.rb', line 5 def initialize( = {}) self.auth_token = [:auth_token] self.source_method = payment_processor([:source_method]) end |
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
3 4 5 |
# File 'lib/spree/conekta/provider.rb', line 3 def auth_token @auth_token end |
#source_method ⇒ Object
Returns the value of attribute source_method.
3 4 5 |
# File 'lib/spree/conekta/provider.rb', line 3 def source_method @source_method end |
Instance Method Details
#authorize(amount, method_params, gateway_options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/spree/conekta/provider.rb', line 10 def (amount, method_params, = {}) common = build_common(amount, ) commit common, method_params, end |