/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $customerId = $this->_customerId; $shopId = $this->_shopId; $secret = $this->_secret; $language = $this->_language; $oToolkitClient = new WirecardCEE_QPay_ToolkitClient(array('CUSTOMER_ID' => $customerId, 'SHOP_ID' => $shopId, 'SECRET' => $secret, 'LANGUAGE' => $language, 'TOOLKIT_PASSWORD' => $this->_toolkitPassword)); $this->object = $oToolkitClient->getOrderDetails($this->_orderNumber); }
/** * Tests WirecardCEE_QPay_ToolkitClient->getOrderDetails() */ public function testGetOrderDetails() { $iOrderNumber = 23473341; $oResult = $this->object->getOrderDetails($iOrderNumber); $order = $oResult->getOrder(); $sPaymentType = $order->getPaymentType(); $this->assertEquals('VPG', $sPaymentType); $this->assertInstanceOf('WirecardCEE_QPay_Response_Toolkit_Order', $order); $this->assertEquals($oResult->getStatus(), 0); $this->assertFalse($oResult->hasFailed()); $this->assertFalse($oResult->getError()); }