Omnipay\PayPal\Message\ExpressInContextAuthorizeRequestTest::testGetDataWithCard PHP Method

testGetDataWithCard() public method

public testGetDataWithCard ( )
    public function testGetDataWithCard()
    {
        $this->request->initialize(array('amount' => '10.00', 'currency' => 'AUD', 'transactionId' => '111', 'description' => 'Order Description', 'returnUrl' => 'https://www.example.com/return', 'cancelUrl' => 'https://www.example.com/cancel', 'subject' => '[email protected]', 'headerImageUrl' => 'https://www.example.com/header.jpg', 'noShipping' => 2, 'allowNote' => 1, 'addressOverride' => 1, 'brandName' => 'Dunder Mifflin Paper Company, Inc.', 'maxAmount' => 123.45, 'logoImageUrl' => 'https://www.example.com/logo.jpg', 'borderColor' => 'CCCCCC', 'localeCode' => 'EN', 'customerServiceNumber' => '1-801-FLOWERS', 'sellerPaypalAccountId' => '[email protected]'));
        $card = new CreditCard(array('name' => 'John Doe', 'address1' => '123 NW Blvd', 'address2' => 'Lynx Lane', 'city' => 'Topeka', 'state' => 'KS', 'country' => 'USA', 'postcode' => '66605', 'phone' => '555-555-5555', 'email' => '[email protected]'));
        $this->request->setCard($card);
        $expected = array('METHOD' => 'SetExpressCheckout', 'VERSION' => ExpressInContextAuthorizeRequest::API_VERSION, 'USER' => null, 'PWD' => null, 'SIGNATURE' => null, 'PAYMENTREQUEST_0_PAYMENTACTION' => 'Authorization', 'SOLUTIONTYPE' => null, 'LANDINGPAGE' => null, 'NOSHIPPING' => 2, 'ALLOWNOTE' => 1, 'ADDROVERRIDE' => 1, 'PAYMENTREQUEST_0_AMT' => '10.00', 'PAYMENTREQUEST_0_CURRENCYCODE' => 'AUD', 'PAYMENTREQUEST_0_INVNUM' => '111', 'PAYMENTREQUEST_0_DESC' => 'Order Description', 'RETURNURL' => 'https://www.example.com/return', 'CANCELURL' => 'https://www.example.com/cancel', 'SUBJECT' => '[email protected]', 'HDRIMG' => 'https://www.example.com/header.jpg', 'PAYMENTREQUEST_0_SHIPTONAME' => 'John Doe', 'PAYMENTREQUEST_0_SHIPTOSTREET' => '123 NW Blvd', 'PAYMENTREQUEST_0_SHIPTOSTREET2' => 'Lynx Lane', 'PAYMENTREQUEST_0_SHIPTOCITY' => 'Topeka', 'PAYMENTREQUEST_0_SHIPTOSTATE' => 'KS', 'PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE' => 'USA', 'PAYMENTREQUEST_0_SHIPTOZIP' => '66605', 'PAYMENTREQUEST_0_SHIPTOPHONENUM' => '555-555-5555', 'EMAIL' => '[email protected]', 'BRANDNAME' => 'Dunder Mifflin Paper Company, Inc.', 'MAXAMT' => 123.45, 'PAYMENTREQUEST_0_TAXAMT' => null, 'PAYMENTREQUEST_0_SHIPPINGAMT' => null, 'PAYMENTREQUEST_0_HANDLINGAMT' => null, 'PAYMENTREQUEST_0_SHIPDISCAMT' => null, 'PAYMENTREQUEST_0_INSURANCEAMT' => null, 'LOGOIMG' => 'https://www.example.com/logo.jpg', 'CARTBORDERCOLOR' => 'CCCCCC', 'LOCALECODE' => 'EN', 'CUSTOMERSERVICENUMBER' => '1-801-FLOWERS', 'PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID' => '[email protected]');
        $this->assertEquals($expected, $this->request->getData());
    }