Skip to content

Commit 6f24297

Browse files
committed
Merge branch 'master' of github.com:xola/authorizenet into optional-cvv
2 parents 84b2c3f + 90329a3 commit 6f24297

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/Message/AIMAbstractRequest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ public function setCustomerId($value)
5353
return $this->setParameter('customerId', $value);
5454
}
5555

56+
public function getHashSecret()
57+
{
58+
return $this->getParameter('hashSecret');
59+
}
60+
public function setHashSecret($value)
61+
{
62+
return $this->setParameter('hashSecret', $value);
63+
}
64+
5665
public function setDuplicateWindow($value)
5766
{
5867
$this->setParameter('duplicateWindow', $value);
@@ -69,7 +78,8 @@ protected function addExtraOptions(\SimpleXMLElement $data)
6978
$extraOptions = $data->addChild('extraOptions');
7079
$node = dom_import_simplexml($extraOptions);
7180
$nodeOwner = $node->ownerDocument;
72-
$node->appendChild($nodeOwner->createCDATASection(sprintf("x_duplicate_window=%s", $this->getDuplicateWindow())));
81+
$duplicateWindowStr = sprintf("x_duplicate_window=%s", $this->getDuplicateWindow());
82+
$node->appendChild($nodeOwner->createCDATASection($duplicateWindowStr));
7383
}
7484
return $data;
7585
}

src/SIMGateway.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
namespace Omnipay\AuthorizeNet;
44

5-
use Omnipay\Common\AbstractGateway;
6-
75
/**
86
* Authorize.Net SIM Class
97
*/
10-
class SIMGateway extends AbstractGateway
8+
class SIMGateway extends AIMGateway
119
{
1210
public function getName()
1311
{
@@ -16,13 +14,9 @@ public function getName()
1614

1715
public function getDefaultParameters()
1816
{
19-
return array(
20-
'apiLoginId' => '',
21-
'transactionKey' => '',
22-
'testMode' => false,
23-
'developerMode' => false,
24-
'hashSecret' => ''
25-
);
17+
$parameters = parent::getDefaultParameters();
18+
$parameters['hashSecret'] = '';
19+
return $parameters;
2620
}
2721

2822
public function getApiLoginId()

0 commit comments

Comments
 (0)