lib/active_merchant/billing/gateways/paymill.rb in activemerchant-1.46.0 vs lib/active_merchant/billing/gateways/paymill.rb in activemerchant-1.47.0

- old
+ new

@@ -83,11 +83,11 @@ options = { :authorization => authorization_from(parsed), :test => (parsed['mode'] == 'test'), } - succeeded = (parsed['data'] == []) || (parsed['data']['response_code'] == 20000) + succeeded = (parsed['data'] == []) || (parsed['data']['response_code'].to_i == 20000) Response.new(succeeded, response_message(parsed), parsed, options) end def authorization_from(parsed_response) parsed_data = parsed_response['data'] @@ -228,10 +228,10 @@ def response_message(parsed_response) return parsed_response["error"] if parsed_response["error"] return "Transaction approved." if (parsed_response['data'] == []) - code = parsed_response["data"]["response_code"] + code = parsed_response["data"]["response_code"].to_i RESPONSE_CODES[code] || code.to_s end class ResponseParser