Skip to content

Commit 97862b7

Browse files
authored
Merge pull request #78 from eileenmcnaughton/hash_anet
Add getters and setters for `hashSecret` at the gateway level. They are already defined at the message level. Since the `hashSecret` is an account setting, it makes sense being able to set it at the gateway.
2 parents c1794cd + 902287a commit 97862b7

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/AIMGateway.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function getDefaultParameters()
2626
'transactionKey' => '',
2727
'testMode' => false,
2828
'developerMode' => false,
29+
'hashSecret' => '',
2930
'liveEndpoint' => 'https://api2.authorize.net/xml/v1/request.api',
3031
'developerEndpoint' => 'https://apitest.authorize.net/xml/v1/request.api',
3132
);
@@ -61,6 +62,16 @@ public function setDeveloperMode($value)
6162
return $this->setParameter('developerMode', $value);
6263
}
6364

65+
public function setHashSecret($value)
66+
{
67+
return $this->setParameter('hashSecret', $value);
68+
}
69+
70+
public function getHashSecret()
71+
{
72+
return $this->getParameter('hashSecret');
73+
}
74+
6475
public function setEndpoints($endpoints)
6576
{
6677
$this->setParameter('liveEndpoint', $endpoints['live']);

src/SIMGateway.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,6 @@ public function setDeveloperMode($value)
5353
return $this->setParameter('developerMode', $value);
5454
}
5555

56-
public function getHashSecret()
57-
{
58-
return $this->getParameter('hashSecret');
59-
}
60-
61-
public function setHashSecret($value)
62-
{
63-
return $this->setParameter('hashSecret', $value);
64-
}
65-
6656
public function authorize(array $parameters = array())
6757
{
6858
return $this->createRequest('\Omnipay\AuthorizeNet\Message\SIMAuthorizeRequest', $parameters);

0 commit comments

Comments
 (0)