diff --git a/src/Omnipay/Adyen/Message/PurchaseRequest.php b/src/Omnipay/Adyen/Message/PurchaseRequest.php index bb8684c..9f5dc44 100755 --- a/src/Omnipay/Adyen/Message/PurchaseRequest.php +++ b/src/Omnipay/Adyen/Message/PurchaseRequest.php @@ -6,7 +6,8 @@ class PurchaseRequest extends AbstractRequest { - protected $endpoint = 'https://test.adyen.com/hpp/pay.shtml'; + protected $liveEndpoint = 'https://live.adyen.com/hpp/pay.shtml'; + protected $testEndpoint = 'https://test.adyen.com/hpp/pay.shtml'; public function getMerchantAccount() { @@ -136,6 +137,6 @@ public function send() public function getEndpoint() { - return $this->endpoint; + return $this->getTestMode() ? $this->testEndpoint : $this->liveEndpoint; } }