Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/www/dev-test/vendorOLD/omnipay/sagepay/tests/Message/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/www/dev-test/vendorOLD/omnipay/sagepay/tests/Message/SharedVoidRequestTest.php
<?php

namespace Omnipay\SagePay\Message;

use Omnipay\Tests\TestCase;

class SharedVoidRequestTest extends TestCase
{
    public function setUp()
    {
        parent::setUp();

        $this->request = new SharedVoidRequest($this->getHttpClient(), $this->getHttpRequest());
        $this->request->initialize(
            array(
                'transactionReference' => '{"SecurityKey":"JEUPDN1N7E","TxAuthNo":"4255","VPSTxId":"{F955C22E-F67B-4DA3-8EA3-6DAC68FA59D2}","VendorTxCode":"438791"}',
                'testMode' => true,
            )
        );
    }

    public function testGetData()
    {
        $data = $this->request->getData();

        $this->assertSame('VOID', $data['TxType']);

        // Reference to the transaction to void.
        $this->assertSame('438791', $data['VendorTxCode']);
        $this->assertSame('{F955C22E-F67B-4DA3-8EA3-6DAC68FA59D2}', $data['VPSTxId']);
        $this->assertSame('JEUPDN1N7E', $data['SecurityKey']);
        $this->assertSame('4255', $data['TxAuthNo']);

        $this->assertSame('VOID', $data['TxType']);
        $this->assertSame('void', $this->request->getService());
    }

    public function testGetEndpoint()
    {
        $url = $this->request->getEndpoint();

        $this->assertSame('https://test.sagepay.com/gateway/service/void.vsp', $url);
    }
}

ZeroDay Forums Mini