public function testGetData() { $this->request->setAmount('1.23'); $this->request->setCurrency('USD'); $this->request->setTransactionId('ABC-123'); $this->request->setUsername('testuser'); $this->request->setPassword('testpass'); $this->request->setSignature('SIG'); $this->request->setSubject('SUB'); $this->request->setDescription('DESC'); $this->request->setNotifyUrl('https://www.example.com/notify'); $this->request->setMaxAmount('0.00'); $this->request->setTaxAmount('0.00'); $this->request->setShippingAmount('0.00'); $this->request->setHandlingAmount('0.00'); $this->request->setShippingDiscount('0.00'); $this->request->setInsuranceAmount('0.00'); $expected = array(); $expected['METHOD'] = 'DoExpressCheckoutPayment'; $expected['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization'; $expected['PAYMENTREQUEST_0_AMT'] = '1.23'; $expected['PAYMENTREQUEST_0_CURRENCYCODE'] = 'USD'; $expected['PAYMENTREQUEST_0_INVNUM'] = 'ABC-123'; $expected['PAYMENTREQUEST_0_DESC'] = 'DESC'; $expected['PAYMENTREQUEST_0_NOTIFYURL'] = 'https://www.example.com/notify'; $expected['USER'] = '******'; $expected['PWD'] = 'testpass'; $expected['SIGNATURE'] = 'SIG'; $expected['SUBJECT'] = 'SUB'; $expected['VERSION'] = ExpressCompleteAuthorizeRequest::API_VERSION; $expected['TOKEN'] = 'TOKEN1234'; $expected['PAYERID'] = 'Payer-1234'; $expected['MAXAMT'] = '0.00'; $expected['PAYMENTREQUEST_0_TAXAMT'] = '0.00'; $expected['PAYMENTREQUEST_0_SHIPPINGAMT'] = '0.00'; $expected['PAYMENTREQUEST_0_HANDLINGAMT'] = '0.00'; $expected['PAYMENTREQUEST_0_SHIPDISCAMT'] = '0.00'; $expected['PAYMENTREQUEST_0_INSURANCEAMT'] = '0.00'; $this->assertEquals($expected, $this->request->getData()); }