lib/active_merchant/billing/gateways/element.rb in activemerchant-1.62.0 vs lib/active_merchant/billing/gateways/element.rb in activemerchant-1.63.0

- old
+ new

@@ -272,10 +272,12 @@ Response.new( success_from(response), message_from(response), response, authorization: authorization_from(action, response, amount), + avs_result: success_from(response) ? avs_from(response) : nil, + cvv_result: success_from(response) ? cvv_from(response) : nil, test: test? ) end def authorization_from(action, response, amount) @@ -290,9 +292,17 @@ response["expressresponsecode"] == "0" end def message_from(response) response["expressresponsemessage"] + end + + def avs_from(response) + AVSResult.new(code: response["card"]["avsresponsecode"]) if response["card"] + end + + def cvv_from(response) + CVVResult.new(response["card"]["cvvresponsecode"]) if response["card"] end def split_authorization(authorization) authorization.split("|") end