/** * Test case for adding / getting PayPal Order Payment history item */ public function testCreatePayPalOrderPayment() { $oOrderPayment = new oePayPalOrderPayment(); $oOrderPayment->setOrderId('123'); $oOrderPayment->setTransactionId('transactionId'); $oOrderPayment->setCorrelationId('correlationId'); $oOrderPayment->setAmount(50); $oOrderPayment->setRefundedAmount(12.13); $oOrderPayment->setAction('capture'); $oOrderPayment->setDate('2012-04-13 15:16:32'); $oOrderPayment->setStatus('status'); $oOrderPayment->setCurrency('LTL'); $oOrderPayment->save(); $oOrderPaymentLoaded = new oePayPalOrderPayment(); $oOrderPaymentLoaded->load($oOrderPayment->getPaymentId()); $this->assertEquals('123', $oOrderPaymentLoaded->getOrderId()); $this->assertEquals('transactionId', $oOrderPaymentLoaded->getTransactionId()); $this->assertEquals('correlationId', $oOrderPaymentLoaded->getCorrelationId()); $this->assertEquals(50, $oOrderPaymentLoaded->getAmount()); $this->assertEquals(12.13, $oOrderPaymentLoaded->getRefundedAmount()); $this->assertEquals('capture', $oOrderPaymentLoaded->getAction()); $this->assertEquals('2012-04-13 15:16:32', $oOrderPaymentLoaded->getDate()); $this->assertEquals('status', $oOrderPaymentLoaded->getStatus()); $this->assertEquals('LTL', $oOrderPaymentLoaded->getCurrency()); }