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