Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Transaction DECLINED but was_successful() returned OK #10

Open
isaac-manubag opened this issue Sep 8, 2017 · 1 comment
Open

Transaction DECLINED but was_successful() returned OK #10

isaac-manubag opened this issue Sep 8, 2017 · 1 comment

Comments

@isaac-manubag
Copy link

as the title goes the transaction still was_successful() even though the response code was 481, DECLINED.

using version 0.1.1

@MarkyC
Copy link

MarkyC commented Sep 28, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants