Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Adds errors property
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 20, 2016
1 parent c27570d commit b905798
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public static function process(Transaction $transaction)
$response = new Response($transaction);
$response->status = Response::INVALID_TRANSACTION_DATA;
$response->successful = false;
$response->errors = $transaction->errors;

return $response;
}
Expand Down
8 changes: 8 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* CraigPaul\Moneris\Response
*
* @property array $errors
* @property bool $failedAvs
* @property bool $failedCvd
* @property null|int $status
Expand Down Expand Up @@ -47,6 +48,13 @@ class Response

const POST_FRAUD = -22;

/**
* Any errors that arise from processing a transaction.
*
* @var array
*/
protected $errors = [];

/**
* Determine if we have failed Address Verification Service verification.
*
Expand Down

0 comments on commit b905798

Please sign in to comment.