welcu/active_merchant_webpay — Issue #3: notify.valid? logic incorrect
Author: tiagomatos
Created: 2011-11-22 04:02:57+00:00
State: open

The last changes on ack output:

def acknowledge
@error ? FAILURE_RESPONSE : SUCCESS_RESPONSE
end

turn the logic on notify.valid? invalid if the ['TBK_RESPUESTA'] is different of '0'

If ['TBK_RESPUESTA'] is not '0' ACEPTADO is sent on the ACK and not RECHAZADO.

A quick fix is replacing the valid? function for:

def valid?
valid= valid_mac && params['TBK_RESPUESTA'] == '0'
@error = true if !valid
valid
end