From e872c77a1cb95b54e9373413136f4d657d379dba Mon Sep 17 00:00:00 2001 From: Tom Fotherby Date: Thu, 16 Jan 2014 20:53:14 +0000 Subject: [PATCH] Add a live endpoint --- src/Omnipay/Adyen/Message/PurchaseRequest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } }