diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 87a85721..29f49c2a 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -127,8 +127,8 @@ abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest /** * @var string Endpoint base URLs. */ - protected $liveEndpoint = 'https://live.sagepay.com/gateway/service'; - protected $testEndpoint = 'https://test.sagepay.com/gateway/service'; + protected $liveEndpoint = 'https://live.opayo.eu.elavon.com/gateway/service'; + protected $testEndpoint = 'https://sandbox.opayo.eu.elavon.com/gateway/service'; public function getVPSProtocol() { diff --git a/tests/DirectGatewayTest.php b/tests/DirectGatewayTest.php index 7b3e7440..c9b61890 100644 --- a/tests/DirectGatewayTest.php +++ b/tests/DirectGatewayTest.php @@ -86,7 +86,7 @@ public function testAuthorize3dSecure() $this->assertTrue($response->isRedirect()); $this->assertSame('{"VendorTxCode":"123"}', $response->getTransactionReference()); $this->assertNull($response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/3DAuthPage.asp', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/3DAuthPage.asp', $response->getRedirectUrl()); $redirectData = $response->getRedirectData(); $this->assertSame('065379457749061954', $redirectData['MD']); @@ -128,7 +128,7 @@ public function testPurchase3dSecure() $this->assertTrue($response->isRedirect()); $this->assertSame('{"VendorTxCode":"123"}', $response->getTransactionReference()); $this->assertNull($response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/3DAuthPage.asp', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/3DAuthPage.asp', $response->getRedirectUrl()); $redirectData = $response->getRedirectData(); $this->assertSame('065379457749061954', $redirectData['MD']); diff --git a/tests/Message/ResponseTest.php b/tests/Message/ResponseTest.php index ab375dff..453b590b 100644 --- a/tests/Message/ResponseTest.php +++ b/tests/Message/ResponseTest.php @@ -46,7 +46,7 @@ public function testDirectPurchase3dSecure() $this->assertTrue($response->isRedirect()); $this->assertSame('{"VendorTxCode":"123456"}', $response->getTransactionReference()); $this->assertNull($response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/3DAuthPage.asp', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/3DAuthPage.asp', $response->getRedirectUrl()); $redirectData = $response->getRedirectData(); $this->assertSame('065379457749061954', $redirectData['MD']); diff --git a/tests/Message/ServerAuthorizeResponseTest.php b/tests/Message/ServerAuthorizeResponseTest.php index 8289fc2b..510242f5 100644 --- a/tests/Message/ServerAuthorizeResponseTest.php +++ b/tests/Message/ServerAuthorizeResponseTest.php @@ -20,7 +20,7 @@ public function testServerPurchaseSuccess() $this->assertTrue($response->isRedirect()); $this->assertSame('{"SecurityKey":"IK776BWNHN","VPSTxId":"{1E7D9C70-DBE2-4726-88EA-D369810D801D}","VendorTxCode":"123456"}', $response->getTransactionReference()); $this->assertSame('Server transaction registered successfully.', $response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); $this->assertSame('GET', $response->getRedirectMethod()); $this->assertNull($response->getRedirectData()); } diff --git a/tests/Message/ServerTokenRegistrationResponseTest.php b/tests/Message/ServerTokenRegistrationResponseTest.php index 061b8ff5..91615cd6 100644 --- a/tests/Message/ServerTokenRegistrationResponseTest.php +++ b/tests/Message/ServerTokenRegistrationResponseTest.php @@ -20,7 +20,7 @@ public function testTokenRegistrationSuccess() $this->assertTrue($response->isRedirect()); $this->assertSame('{"SecurityKey":"IK776BWNHN","VPSTxId":"{1E7D9C70-DBE2-4726-88EA-D369810D801D}","VendorTxCode":"123456"}', $response->getTransactionReference()); $this->assertSame('Server transaction registered successfully.', $response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); $this->assertSame('GET', $response->getRedirectMethod()); $this->assertNull($response->getRedirectData()); } diff --git a/tests/Message/SharedAbortRequestTest.php b/tests/Message/SharedAbortRequestTest.php index 95dc5c55..361cbf40 100644 --- a/tests/Message/SharedAbortRequestTest.php +++ b/tests/Message/SharedAbortRequestTest.php @@ -36,6 +36,6 @@ public function testGetEndpoint() { $url = $this->request->getEndpoint(); - $this->assertSame('https://test.sagepay.com/gateway/service/abort.vsp', $url); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/gateway/service/abort.vsp', $url); } } diff --git a/tests/Message/SharedRefundRequestTest.php b/tests/Message/SharedRefundRequestTest.php index 320f5696..afca2a6d 100644 --- a/tests/Message/SharedRefundRequestTest.php +++ b/tests/Message/SharedRefundRequestTest.php @@ -36,6 +36,6 @@ public function testGetEndpoint() { $url = $this->request->getEndpoint(); - $this->assertSame('https://test.sagepay.com/gateway/service/refund.vsp', $url); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/gateway/service/refund.vsp', $url); } } diff --git a/tests/Message/SharedVoidRequestTest.php b/tests/Message/SharedVoidRequestTest.php index 78f2b6d1..b7e07bef 100644 --- a/tests/Message/SharedVoidRequestTest.php +++ b/tests/Message/SharedVoidRequestTest.php @@ -39,6 +39,6 @@ public function testGetEndpoint() { $url = $this->request->getEndpoint(); - $this->assertSame('https://test.sagepay.com/gateway/service/void.vsp', $url); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/gateway/service/void.vsp', $url); } } diff --git a/tests/Mock/DirectPurchase3dSecure.txt b/tests/Mock/DirectPurchase3dSecure.txt index 164c6890..a333df1a 100644 --- a/tests/Mock/DirectPurchase3dSecure.txt +++ b/tests/Mock/DirectPurchase3dSecure.txt @@ -12,5 +12,5 @@ VPSProtocol=3.00 Status=3DAUTH 3DSecureStatus=OK MD=065379457749061954 -ACSURL=https://test.sagepay.com/Simulator/3DAuthPage.asp +ACSURL=https://sandbox.opayo.eu.elavon.com/Simulator/3DAuthPage.asp PAReq=BSkaFwYFFTYAGyFbAB0LFRYWBwsBZw0EGwECEX9YRGFWc08pJCVVKgAANS0KADoZCCAMBnIeOxcWRg0LERdOOTQRDFRdVHNYUgwTMBsBCxABJw4DJHE+ERgPCi8MVC0HIAROCAAfBUk4ER89DD0IWDkvMQ1VdFwoUFgwXVYvbHgvMkdBXXNbQGIjdl1ZUEc1XSwqAAgUUicYBDYcB3I2AjYjIzsn diff --git a/tests/Mock/ServerPurchaseSuccess.txt b/tests/Mock/ServerPurchaseSuccess.txt index c14c3a3b..dfb3f898 100644 --- a/tests/Mock/ServerPurchaseSuccess.txt +++ b/tests/Mock/ServerPurchaseSuccess.txt @@ -13,4 +13,4 @@ Status=OK StatusDetail=Server transaction registered successfully. VPSTxId={1E7D9C70-DBE2-4726-88EA-D369810D801D} SecurityKey=IK776BWNHN -NextURL=https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D} +NextURL=https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D} diff --git a/tests/Mock/ServerPurchaseWithToken.txt b/tests/Mock/ServerPurchaseWithToken.txt index 4698205c..92c8298d 100644 --- a/tests/Mock/ServerPurchaseWithToken.txt +++ b/tests/Mock/ServerPurchaseWithToken.txt @@ -13,5 +13,5 @@ Status=OK StatusDetail=Server transaction registered successfully. VPSTxId={1E7D9C70-DBE2-4726-88EA-D369810D801D} SecurityKey=IK776BWNHN -NextURL=https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D} -Token={ABCDEFGH-ABCD-ABCD-ABCD-ABCDEFGHIJKL} \ No newline at end of file +NextURL=https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D} +Token={ABCDEFGH-ABCD-ABCD-ABCD-ABCDEFGHIJKL} diff --git a/tests/Mock/ServerTokenRegistrationSuccess.txt b/tests/Mock/ServerTokenRegistrationSuccess.txt index c14c3a3b..dfb3f898 100644 --- a/tests/Mock/ServerTokenRegistrationSuccess.txt +++ b/tests/Mock/ServerTokenRegistrationSuccess.txt @@ -13,4 +13,4 @@ Status=OK StatusDetail=Server transaction registered successfully. VPSTxId={1E7D9C70-DBE2-4726-88EA-D369810D801D} SecurityKey=IK776BWNHN -NextURL=https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D} +NextURL=https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D} diff --git a/tests/ServerGatewayTest.php b/tests/ServerGatewayTest.php index 05808cc1..b13375ad 100644 --- a/tests/ServerGatewayTest.php +++ b/tests/ServerGatewayTest.php @@ -76,7 +76,7 @@ public function testAuthorizeSuccess() $this->assertTrue($response->isRedirect()); $this->assertSame('{"SecurityKey":"IK776BWNHN","VPSTxId":"{1E7D9C70-DBE2-4726-88EA-D369810D801D}","VendorTxCode":"123"}', $response->getTransactionReference()); $this->assertSame('Server transaction registered successfully.', $response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); } public function testAuthorizeFailure() @@ -147,7 +147,7 @@ public function testPurchaseSuccess() $this->assertTrue($response->isRedirect()); $this->assertSame('{"SecurityKey":"IK776BWNHN","VPSTxId":"{1E7D9C70-DBE2-4726-88EA-D369810D801D}","VendorTxCode":"123"}', $response->getTransactionReference()); $this->assertSame('Server transaction registered successfully.', $response->getMessage()); - $this->assertSame('https://test.sagepay.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); + $this->assertSame('https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}', $response->getRedirectUrl()); } public function testPurchaseFailure()