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

Commit

Permalink
Adds card verification functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 20, 2016
1 parent eeb2df9 commit 1a5eec1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,23 @@ protected function transaction(array $params = null)

return $this->transaction;
}

/**
* Validate CVD and/or AVS prior to attempting a purchase.
*
* @param array $params
*
* @return \CraigPaul\Moneris\Response
*/
public function verify(array $params = [])
{
$params = array_merge($params, [
'type' => 'card_verification',
'crypt_type' => Crypt::SSL_ENABLED_MERCHANT,
]);

$transaction = $this->transaction($params);

return $this->process($transaction);
}
}
1 change: 1 addition & 0 deletions src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public function valid()

if (isset($params['type'])) {
switch ($params['type']) {
case 'card_verification':
case 'preauth':
case 'purchase':
$errors[] = Validator::set($params, 'order_id') ? null : 'Order Id not provided.';
Expand Down

0 comments on commit 1a5eec1

Please sign in to comment.