File manager - Edit - /home/asiatechinc/public_html/bhrhotelsindia.com/vendor/omnipay/migs/tests/Message/ThreePartyCompletePurchaseRequestTest.php
Back
<?php namespace Omnipay\Migs\Message; use Omnipay\Tests\TestCase; class ThreePartyCompletePurchaseRequestTest extends TestCase { public function setUp() { $this->request = new ThreePartyCompletePurchaseRequest($this->getHttpClient(), $this->getHttpRequest()); } public function testThreePartyCompletePurchaseSuccess() { $data = array(); $data['vpc_Message'] = "Approved"; $data['vpc_ReceiptNo'] = "12345"; $data['vpc_TxnResponseCode'] = "0"; $data['vpc_SecureHash'] = "8720B88CA00352B2A5F4D51C64E86BCB"; $response = new Response($this->getMockRequest(), $data); $this->assertInstanceOf('Omnipay\Migs\Message\Response', $response); $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('12345', $response->getTransactionReference()); $this->assertSame('Approved', $response->getMessage()); $this->assertSame('0', $response->getCode()); } public function testThreePartyCompletePurchaseFailure() { $data = array(); $data['vpc_Message'] = "Error"; $data['vpc_ReceiptNo'] = "12345"; $data['vpc_TxnResponseCode'] = "1"; $data['vpc_SecureHash'] = "8720B88CA00352B2A5F4D51C64E86BCB"; $response = new Response($this->getMockRequest(), $data); $this->assertInstanceOf('Omnipay\Migs\Message\Response', $response); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('12345', $response->getTransactionReference()); $this->assertNotSame('Approved', $response->getMessage()); $this->assertSame('1', $response->getCode()); } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings