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.



231
232
233
234
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 231

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

Instance Method Details

#generate_responseObject



236
237
238
239
240
241
242
243
244
245
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 236

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