⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
work
/
vendor
/
omnipay
/
migs
/
tests
/
Message
/
View File Name :
TwoPartyPurchaseResponseTest.php
<?php namespace Omnipay\Migs\Message; use Omnipay\Tests\TestCase; class TwoPartyPurchaseResponseTest extends TestCase { public function testTwoPartyPurchaseSuccess() { $httpResponse = $this->getMockHttpResponse('TwoPartyPurchaseSuccess.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $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 testTwoPartyPurchaseFailure() { $httpResponse = $this->getMockHttpResponse('TwoPartyPurchaseFailure.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $this->assertInstanceOf('Omnipay\Migs\Message\Response', $response); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('12345', $response->getTransactionReference()); $this->assertSame('Declined', $response->getMessage()); $this->assertSame('2', $response->getCode()); } }