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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/dokan/script/vendor/omnipay/stripe/tests/Message/PaymentIntents/   drwxrwxrwx
Free 13 GB of 57.97 GB (22.43%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     ResponseTest.php (4.36 KB)      -rwxrwxrwx
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Omnipay\Stripe\Message\PaymentIntents;

use 
Omnipay\Tests\TestCase;

class 
ResponseTest extends TestCase
{
    public function 
testStatus()
    {
        
$httpResponse $this->getMockHttpResponse('AuthorizeSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('requires_confirmation'$response->getStatus());
    }

    public function 
testRequiresConfirmation()
    {
        
$httpResponse $this->getMockHttpResponse('AuthorizeSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertTrue($response->requiresConfirmation());
    }

    public function 
testGetCardReference()
    {
        
$httpResponse $this->getMockHttpResponse('AuthorizeSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('pm_1Euf5RFSbr6xR4YAwZ5fP28B'$response->getCardReference());

        
$httpResponse $this->getMockHttpResponse('CreatePaymentMethodSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('pm_1EUon32Tb35ankTnF6nuoRVE'$response->getCardReference());
    }

    public function 
testGetCustomerReference()
    {
        
$httpResponse $this->getMockHttpResponse('AuthorizeSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('cus_F1UMEEnT2OBgMg'$response->getCustomerReference());

        
$httpResponse $this->getMockHttpResponse('ConfirmIntent3dsRedirect.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('cus_Q8sHn93nAzgdn1'$response->getCustomerReference());
    }

    public function 
testGetCaptureMethod()
    {
        
$httpResponse $this->getMockHttpResponse('AuthorizeSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('manual'$response->getCaptureMethod());

        
$httpResponse $this->getMockHttpResponse('PurchaseSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('automatic'$response->getCaptureMethod());
    }

    public function 
testGetTransactionReference()
    {
        
$httpResponse $this->getMockHttpResponse('AuthorizeSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertNull($response->getTransactionReference());

        
$httpResponse $this->getMockHttpResponse('PurchaseSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertSame('ch_1EW0FmFSbr6xR4YAZyURWxQe'$response->getTransactionReference());
    }

    public function 
testRedirectsAndSuccess()
    {
        
$httpResponse $this->getMockHttpResponse('ConfirmIntent3dsRedirect.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertFalse($response->isSuccessful());
        
$this->assertTrue($response->isRedirect());
        
$this->assertSame('https://hooks.stripe.com/3d_secure_2_eap/begin_test/src_1Ev1M5FSbr6xR4YAg5qdBN6B/src_client_secret_FPr4a6wAiVNi6YrnuI7vah6H'$response->getRedirectUrl());

        
$httpResponse $this->getMockHttpResponse('AuthorizeFailure.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertFalse($response->isSuccessful());
        
$this->assertFalse($response->isRedirect());
        
$this->assertNull($response->getRedirectUrl());
    }

    public function 
testCancelled()
    {
        
$httpResponse $this->getMockHttpResponse('CancelPaymentIntentSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertFalse($response->isSuccessful());
        
$this->assertTrue($response->isCancelled());

        
$httpResponse $this->getMockHttpResponse('ConfirmIntentSuccess.txt');
        
$response = new Response($this->getMockRequest(), (string) $httpResponse->getBody());

        
$this->assertTrue($response->isSuccessful());
        
$this->assertFalse($response->isCancelled());
    }
}

:: 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.0144 ]--