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

Commit

Permalink
Adds caveat example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Dec 8, 2016
1 parent 33b0494 commit 7c35112
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,39 @@ $params = [
$response = $gateway->verify($params); // could be purchase, preauth, etc.
```

> Note: When making an AVS or CVD secured transaction, even if AVS or CVD fails, you will still have to void the transaction. There are two easy ways around this (DAMN MONERIS!).
Verify the card first.

```php
$response = $gateway->verify($params);

if ($response->successful && !$response->failedAvs && !$response->failedCvd) {
$response = $gateway->purchase($params);

if ($response->successful) {
$receipt = $response->receipt();
} else {
$errors = $response->errors;
}
}
```

Void the transaction.

```php
$response = $gateway->purchase($params);

if ($response->successful && ($response->failedAvs || $response->failedCvd)) {
$errors = $response->errors;
$response = $gateway->void($response->transaction);
} elseif (!$response->successful) {
$errors = $response->errors;
} else {
$receipt = $response->receipt();
}
```

## Vault

The Moneris Vault allows you create and maintain credit card profiles on the Moneris servers instead of your own. To access the Vault, you will need to have your instantiated Gateway ([see above](#instantiation)).
Expand Down

0 comments on commit 7c35112

Please sign in to comment.