lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.133.0 vs lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.137.0

- old
+ new

@@ -177,15 +177,19 @@ # Pending Status also means Acknowledged (as stated in their specification) success = response[:FunctionResult] == 'ACK' || response[:FunctionResult] == 'PENDING' message = response[:Message] authorization = response[:GuWID] - Response.new(success, message, response, + Response.new( + success, + message, + response, test: test?, authorization: authorization, avs_result: { code: avs_code(response, options) }, - cvv_result: response[:CVCResponseCode]) + cvv_result: response[:CVCResponseCode] + ) rescue ResponseError => e if e.response.code == '401' return Response.new(false, 'Invalid Login') else raise @@ -403,10 +407,10 @@ 'A' => 'B', # CSC and Address Matched 'F' => 'D', # All Data Matched 'N' => 'I', # CSC Match 'U' => 'U', # Data Not Checked 'Y' => 'D', # All Data Matched - 'Z' => 'P', # CSC and Postcode Matched + 'Z' => 'P' # CSC and Postcode Matched } # Amex have different AVS response codes to visa etc def avs_code(response, options) if response.has_key?(:AVS_ProviderResultCode)