Class: ActiveMerchant::Billing::PaymillGateway::ResponseParser

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/paymill.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_response = "", options = {}) ⇒ ResponseParser

Returns a new instance of ResponseParser.



179
180
181
182
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 179

def initialize(raw_response="", options={})
  @raw_response = raw_response
  @options = options
end

Instance Method Details

#generate_responseObject



184
185
186
187
188
189
190
191
192
193
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 184

def generate_response
  parse_response
  if parsed['error']
    handle_response_parse_error
  else
    handle_response_correct_parsing
  end

  Response.new(succeeded, message, parsed, options)
end