moneris-eselectplus-api
moneris-eselectplus-api copied to clipboard
Transaction DECLINED but was_successful() returned OK
as the title goes the transaction still was_successful() even though the response code was 481, DECLINED.
using version 0.1.1
Maybe try creating an SCCEE to illustrate this issue?
Going through the codebase, it seems 481
is handled as Declined:
// was it a successful transaction?
// any response code greater than 49 is an error code:
if ((int) $receipt->ResponseCode >= 50 || (int) $receipt->ResponseCode == 0) {
// trying to make some sense of this... grouping them as best as I can:
switch ($receipt->ResponseCode) {
// ...
case '481':
case '483':
$this->error_code(Moneris_Result::ERROR_DECLINED);
break;
// ...
}
return $this->was_successful(false);
}
https://github.com/ironkeith/moneris-eselectplus-api/blob/master/lib/Moneris/Result.php#L328