public function testPurchase() { $transaction = new Purchase($this->getConfig(), array('cc_number' => '4242424242424242', 'expiry_month' => 10, 'expiry_year' => 18, 'order_id' => 'test' . date("dmy-G:i:s"), 'amount' => 100)); $errors = $transaction->validate(); $this->assertEquals(0, count($errors)); if (count($errors) == 0) { $xml = $this->getCurlResponse($transaction); $this->assertNotNull($xml->receipt); $this->assertEquals("027", $xml->receipt->ResponseCode); } }