|
|
|
@ -25,6 +25,25 @@ class Wxpay_call
|
|
|
|
|
$this->api_info_arr['app_secret'] = $this->wx_site_config['app_secret'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function queryorder($query_content)
|
|
|
|
|
{
|
|
|
|
|
$ret = array('status'=>false, 'data'=>array());
|
|
|
|
|
$this->init_api();
|
|
|
|
|
unset($this->api_info_arr['key']);
|
|
|
|
|
unset($this->api_info_arr['app_secret']);
|
|
|
|
|
$url = "https://api.mch.weixin.qq.com/pay/orderquery";
|
|
|
|
|
$query_content_input = $query_content->getBizContent(true);
|
|
|
|
|
$this->api_info_arr['nonce_str'] = ($this->get_nonce_str());//随机字符串
|
|
|
|
|
|
|
|
|
|
$this->api_info_arr['sign'] = $this->make_sign(array_merge($this->api_info_arr, $query_content_input));//签名
|
|
|
|
|
$xml = to_xml(array_merge($this->api_info_arr, $query_content_input));
|
|
|
|
|
|
|
|
|
|
$response = $this->post_xml_curl($this->api_info_arr, $xml, $url, 20);
|
|
|
|
|
$ret['status'] = true;
|
|
|
|
|
$ret['data'] = from_xml($response);
|
|
|
|
|
return $ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 下载对账单,WxPayDownloadBill中bill_date为必填参数
|
|
|
|
|
* appid、mchid、spbill_create_ip、nonce_str不需要填入
|
|
|
|
|