|
|
@ -393,8 +393,8 @@ class WeixinPayBtoC extends Wxpay_client_pub
|
|
|
|
$data=array(
|
|
|
|
$data=array(
|
|
|
|
'mch_appid'=> $this->appid, //商户账号appid
|
|
|
|
'mch_appid'=> $this->appid, //商户账号appid
|
|
|
|
'mchid'=> $this->mchid,//商户号
|
|
|
|
'mchid'=> $this->mchid,//商户号
|
|
|
|
'nonce_str'=> '9wmwosxrqkbd6jtqv7cpxvsbvrj9icnu',//$this->createNoncestr(),//随机字符串
|
|
|
|
'nonce_str'=> $this->createNoncestr(),//随机字符串
|
|
|
|
'partner_trade_no'=> '1628583966',//$orderId ? $orderId : date('YmdHis').rand(1000, 9999),//商户订单号
|
|
|
|
'partner_trade_no'=> $orderId ? $orderId : date('YmdHis').rand(1000, 9999),//商户订单号
|
|
|
|
'openid'=> $openId,//用户openid
|
|
|
|
'openid'=> $openId,//用户openid
|
|
|
|
'check_name'=>'FORCE_CHECK',//校验用户姓名选项,
|
|
|
|
'check_name'=>'FORCE_CHECK',//校验用户姓名选项,
|
|
|
|
're_user_name'=> $realName,//收款用户姓名
|
|
|
|
're_user_name'=> $realName,//收款用户姓名
|
|
|
@ -417,11 +417,12 @@ class WeixinPayBtoC extends Wxpay_client_pub
|
|
|
|
$xml = $this->arraytoxml($data);
|
|
|
|
$xml = $this->arraytoxml($data);
|
|
|
|
|
|
|
|
|
|
|
|
$url='https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers'; //调用接口
|
|
|
|
$url='https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers'; //调用接口
|
|
|
|
var_dump($data, $xml);
|
|
|
|
|
|
|
|
$res = $this->postXmlSSLCurl($xml, $url);
|
|
|
|
$res = $this->postXmlSSLCurl($xml, $url);
|
|
|
|
$return = $this->xmltoarray($res);
|
|
|
|
$return = $this->xmltoarray($res);
|
|
|
|
|
|
|
|
|
|
|
|
var_dump($return);
|
|
|
|
return $return;
|
|
|
|
|
|
|
|
|
|
|
|
//返回来的结果是xml,最后转换成数组
|
|
|
|
//返回来的结果是xml,最后转换成数组
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
array(9) {
|
|
|
|
array(9) {
|
|
|
|