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

Commit

Permalink
Adds vault cvd purchase functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Paul committed Oct 23, 2016
1 parent 35c0a40 commit 0fc4104
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,17 @@ public function capture($transaction, string $order = null, $amount = null)
*/
public function cards()
{
return new Vault($this->id, $this->token, $this->environment);
$vault = new Vault($this->id, $this->token, $this->environment);

if (isset($this->avs)) {
$vault->avs = boolval($this->avs);
}

if (isset($this->cvd)) {
$vault->cvd = boolval($this->cvd);
}

return $vault;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function toXml()
$type = $xml->addChild($params['type']);
$efraud = in_array(
$params['type'],
['purchase', 'preauth', 'card_verification', 'cavv_purchase', 'cavv_preauth']
['purchase', 'preauth', 'card_verification', 'cavv_purchase', 'cavv_preauth', 'res_purchase_cc']
);
unset($params['type']);

Expand Down

0 comments on commit 0fc4104

Please sign in to comment.