Class: Spree::Conekta::MonthlyPaymentProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/spree/conekta/monthly_payment_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ MonthlyPaymentProvider

Returns a new instance of MonthlyPaymentProvider.



7
8
9
10
# File 'lib/spree/conekta/monthly_payment_provider.rb', line 7

def initialize(options = {})
  @options       = options
  @auth_token    = options[:auth_token]
end

Instance Attribute Details

#auth_tokenObject

Returns the value of attribute auth_token.



3
4
5
# File 'lib/spree/conekta/monthly_payment_provider.rb', line 3

def auth_token
  @auth_token
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/spree/conekta/monthly_payment_provider.rb', line 5

def options
  @options
end

Instance Method Details

#authorize(amount, source, gateway_options = {}) ⇒ Object



12
13
14
# File 'lib/spree/conekta/monthly_payment_provider.rb', line 12

def authorize(amount, source, gateway_options = {})
  Response.new(parse_conekta_response(source.conekta_response), gateway_options)
end

#capture(amount, source, gateway_options = {}) ⇒ Object



16
17
18
# File 'lib/spree/conekta/monthly_payment_provider.rb', line 16

def capture(amount, source, gateway_options = {})
  Response.new({}, gateway_options)
end