public function get_payment_status($reference) { $result = null; $merchant = new Pronamic_WP_Pay_Gateways_PayDutch_Merchant($this->username, $this->password); $merchant->reference = $reference; $merchant->test = $this->test; $message = new Pronamic_WP_Pay_Gateways_PayDutch_XML_QueryRequestMessage($merchant); $result = $this->request($message); if (is_wp_error($result)) { $this->error = $result; } else { $xml = Pronamic_WP_Util::simplexml_load_string($result); if (is_wp_error($xml)) { $this->error = $xml; } else { $result = Pronamic_WP_Pay_Gateways_PayDutch_XML_PaymentInfoParser::parse($xml->paymentinfo); } } return $result; }
/** * @depends test_init */ function test_parser($simplexml) { $payment_info = Pronamic_WP_Pay_Gateways_PayDutch_XML_PaymentInfoParser::parse($simplexml->paymentinfo); $this->assertInstanceOf('Pronamic_WP_Pay_Gateways_PayDutch_PaymentInfo', $payment_info); return $payment_info; }