Skip to content

Commit

Permalink
Merge pull request #2 from digitickets/2.x-change-endpoint-urls-opayo…
Browse files Browse the repository at this point in the history
…-server

update endpoint urls (v2 branch)
  • Loading branch information
hkwak committed Dec 6, 2023
2 parents bed6fc5 + 916dba7 commit 5445c0a
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Message/AbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/DirectGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down Expand Up @@ -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']);
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/ServerAuthorizeResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/ServerTokenRegistrationResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Message/SharedAbortRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/Message/SharedRefundRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/Message/SharedVoidRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/Mock/DirectPurchase3dSecure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/Mock/ServerPurchaseSuccess.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
4 changes: 2 additions & 2 deletions tests/Mock/ServerPurchaseWithToken.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
NextURL=https://sandbox.opayo.eu.elavon.com/Simulator/VSPServerPaymentPage.asp?TransactionID={1E7D9C70-DBE2-4726-88EA-D369810D801D}
Token={ABCDEFGH-ABCD-ABCD-ABCD-ABCDEFGHIJKL}
2 changes: 1 addition & 1 deletion tests/Mock/ServerTokenRegistrationSuccess.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
4 changes: 2 additions & 2 deletions tests/ServerGatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 5445c0a

Please sign in to comment.