/** * 将xml转为array * @param string $xml * @throws WxPayException */ public static function Init($xml, $key) { $obj = new self(); $obj->SetKey($key); $obj->FromXml($xml); //fix bug 2015-06-29 if ($obj->values['return_code'] != 'SUCCESS') { return $obj->GetValues(); } $obj->CheckSign(); return $obj->GetValues(); }