/** * Test updating a completed refund transaction with an valid refund_completed * notification. */ public function testUpdateRefundAgainstCompleted() { $_GET = array('state' => 'refund_completed', 'refund_transaction_id' => '27828461', 'origin_transaction_id' => '27767585', 'shop_id' => '10000', 'customer_email' => '*****@*****.**', 'amount' => '3.9', 'currency' => 'EUR', 'origin_order_id' => '5', 'customer_var_0' => '', 'customer_var_1' => '', 'customer_var_2' => '', 'hash' => 'f261e1f2ec063b31c023dfa10b1471ce87bc4e90c2b3a5a554fdf410c444bce58b9030e86d1eb1298445cb2a8d9de3cceb119a04936418c5a29d86b979ce3337'); $this->oUpdateHandler->checkData($_GET); $this->assertFalse($this->oUpdateHandler->updateRefund()); $oOrder = new oxOrder(); $oOrder->load('6988a7466abe756b93c1f0b2b11af7d3'); $aRefundData = unserialize(str_replace(""", "\"", $oOrder->oxorder__bzrefunds->value)); foreach ($aRefundData as $aRefund) { if ($aRefund['refundid'] == '27828393') { $this->assertEquals('pending', $aRefund['state']); } } }
/** * Test case for oePayPalOxOrder::deletePayPalOrder() * * @return null */ public function testDeletePayPalOrder() { $oTestOrder = new oxOrder(); $oTestOrder->setId('_testOrderId'); $oTestOrder->save(); $this->getSession()->setVariable('sess_challenge', '_testOrderId'); $oOrder = new oePayPalOxOrder(); $oOrder->deletePayPalOrder(); $oUpdatedOrder = new oxOrder(); $this->assertFalse($oUpdatedOrder->load('_testOrderId')); }