-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ability to change endpoint urls #16
base: master
Are you sure you want to change the base?
Changes from 5 commits
4daf2f7
49d9807
4b467bc
d6d40ee
31cf30b
ec574a3
4a8f35b
746a6fe
0f14eb8
8543016
6abd1d3
be85459
a7c887c
a0c0b24
ddef3d6
c40724a
dc32d8e
8b929e4
53e342d
bad47ad
0802aab
948b737
3b83247
71ecb9a
d270e3c
cab2de2
4072174
6a9b41e
6e6e542
3a45694
d534dac
1e71f28
23333f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
*/ | ||
class SavedAuthRequest extends RemoteAbstractRequest | ||
{ | ||
protected $endpoint = 'https://epage.payandshop.com/epage-remote.cgi'; | ||
// protected $endpoint = 'https://epage.payandshop.com/epage-remote.cgi'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this line is no longer used, it should be removed rather than commented out. |
||
|
||
public function getCavv() | ||
{ | ||
|
@@ -154,6 +154,10 @@ protected function createResponse($data) | |
|
||
public function getEndpoint() | ||
{ | ||
return $this->endpoint; | ||
return $this->getParameter('SecureDataVaultEndpoint'); | ||
} | ||
public function setAuthEndpoint($value) | ||
{ | ||
return $this->setParameter('SecureDataVaultEndpoint', $value); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ | |
*/ | ||
class VoidRequest extends RemoteAbstractRequest | ||
{ | ||
protected $endpoint = 'https://epage.payandshop.com/epage-remote.cgi'; | ||
|
||
public function getTransactionReference() | ||
{ | ||
return $this->getParameter('pasRef'); | ||
|
@@ -97,6 +95,10 @@ protected function createResponse($data) | |
|
||
public function getEndpoint() | ||
{ | ||
return $this->endpoint; | ||
return $this->getParameter('SecureDataVaultEndpoint'); | ||
} | ||
public function setAuthEndpoint($value) | ||
{ | ||
return $this->setParameter('SecureDataVaultEndpoint', $value); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should getters/setters not be using lower-camel-case parameter names to match the defaults defined in RemoteGateway.php? I'm not sure if the parameter bag is case-insenstive, but it would seem to make sense to be consistent with the other getters/setters... |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make more sense to leave the endpoint property in place, and allow the setter and getter to set it/access it? Also by removing it will break the existing Global Iris driver, which extends these requests (see https://github.com/coatesap/omnipay-global-iris/blob/master/src/Omnipay/GlobalIris/Message/AuthRequest.php for example). If there is no real reason to remove it, I'd rather not have to remove/upgrade/lock down the Global Iris driver...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sort of agree with this implementation. This makes it possible to inject the parameters at the configuration stage (as per the merchant ID etc). Obviously the omnipay interfaces need to be adhered to so this results in not being able to explicitly pass the endpoint other than in the params.