- 企业付款到零钱返回false?
这是我的参数,求助大佬 <xml> <amount>100</amount> <check_name>FORCE_CHECK</check_name> <desc>测试</desc> <mch_appid>wxffd8126ff3c*****</mch_appid> <mchid>152353****</mchid> <nonce_str>qyptz879k98dtqtut2v0dcw8ulbp****</nonce_str> <openid>oirl45BOOIz2-muS7QqvWIquta**</openid> <partner_trade_no>201911071633052091</partner_trade_no> <re_user_name>xxx</re_user_name> <spbill_create_ip>118.190.*.*</spbill_create_ip> <sign>c6ae36e20849549b2ea0d56f29b9****</sign> </xml>
2019-11-09 - 调用企业付款到零钱一直返回false?
调用企业付款到零钱一直返回false?
2019-11-07 - 商城类小程序,能加社区论坛类的板块吗?
商城类小程序,能加社区论坛类的板块吗? 需要什么证书 或资质呢?
2019-11-03 - onShareAppMessage该怎么调用?
在其他函数中 调用分享函数 onShareAppMessage 为啥无效呢? 也不报错,也不弹出分享框 求教该怎么用
2019-10-30 - 微信支付调用失败,出乱码了?
string(12) "cash_xmldata" array(5) { ["return_code"]=> string(7) "SUCCESS" ["return_msg"]=> string(66) "鍙傛暟閿欒锛氱敤鎴穙penid瀛楁蹇呭~锛屽苟涓斿皯浜�32涓瓧绗�." ["result_code"]=> string(4) "FAIL" ["err_code"]=> string(11) "PARAM_ERROR" ["err_code_des"]=> string(66) "鍙傛暟閿欒锛氱敤鎴穙penid瀛楁蹇呭~锛屽苟涓斿皯浜�32涓瓧绗�." } [{"status":0,"msg":"\u53c2\u6570\u9519\u8bef\uff1a\u7528\u6237openid\u5b57\u6bb5\u5fc5\u586b\uff0c\u5e76\u4e14\u5c11\u4e8e32\u4e2a\u5b57\u7b26."}] 小白求帮忙,微信提现功能, 这是咋回事啊 public function success_tixian(){ $pub = ['app_id'=>'11111','mch_id'=>'1','key'=>' 1111 '];//config('keys.payConfig'); $appid = $pub['app_id'];//商户账号appid $mch_id = $pub['mch_id'];//商户号 $key = $pub['key']; $openid = $openId;//授权用户openid $arr = array(); $arr['mch_appid'] = $appid; $arr['mchid'] = $mch_id; $arr['nonce_str'] = md5(uniqid(microtime(true),true));//随机字符串,不长于32位 $arr['partner_trade_no'] = '123456789' . date("Ymd") . rand(10000, 90000) . rand(10000, 90000);//商户订单号 $arr['openid'] = $openid; $arr['check_name'] = 'NO_CHECK';//是否验证用户真实姓名,这里不验证 $arr['amount'] = 1.00;//付款金额,单位为分 $arr['desc'] = "零钱提现";//描述信息 $arr['spbill_create_ip'] = '';// //封装的关于签名的算法 $arr['sign'] = $this->makeSign($arr,$key);//签名 $var = $this->arrayToXml($arr); // dump($arr['sign'] );exit; $xml = $this->curl_post_ssl('https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers',$var,30, array(), 1); libxml_disable_entity_loader(true); //echo $xml; die; $obj1=simplexml_load_string($xml,'SimpleXMLElement'); //var_dump($obj1); die; $rdata = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)),true); var_dump('cash_xmldata',$rdata);//eblog('cash_xmldata',$rdata); // dump($rdata);exit; $return_code = trim(strtoupper($rdata['return_code'])); $result_code = trim(strtoupper($rdata['result_code'])); if ($return_code == 'SUCCESS' && $result_code == 'SUCCESS') { $isrr = array( 'status'=>1, 'msg' => '', ); } else { // $returnmsg = $rdata['return_msg']; $err_code_des = $rdata['err_code_des']; $isrr = array( 'status' => 0, 'msg' => $err_code_des, ); } die(json_encode(array($isrr))); } protected function makesign($data,$key) { //获取微信支付秘钥 $data = array_filter($data); //签名步骤一:按字典序排序参数 ksort($data); $string_a = http_build_query($data); $string_a = urldecode($string_a); //$config=$this->config; $string_sign_temp = $string_a."&key=".$key; $sign = md5($string_sign_temp); $result = strtoupper($sign); // $result = strtoupper(hash_hmac("sha256",$string_sign_temp,$key)); return $result; } protected function arraytoxml($data){ $str='<xml>'; foreach($data as $k=>$v) { $str.='<'.$k.'>'.$v.'</'.$k.'>'; } $str.='</xml>'; return $str; } protected function curl_post_ssl($url, $vars, $second = 30, $aHeader = array()) { $ch = curl_init();//初始化curl curl_setopt($ch, CURLOPT_TIMEOUT, $second);//设置执行最长秒数 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上 curl_setopt($ch, CURLOPT_URL, $url);//抓取指定网页 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// 终止从服务端进行验证 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);// curl_setopt($ch, CURLOPT_SSLCERTTYPE, 'PEM');//证书类型 curl_setopt($ch, CURLOPT_SSLCERT, 'D:/phpStudy/PHPTutorial/WWW/wxpay/cert/apiclient_cert.pem');//证书位置 curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');//CURLOPT_SSLKEY中规定的私钥的加密类型 curl_setopt($ch, CURLOPT_SSLKEY, 'D:/phpStudy/PHPTutorial/WWW/wxpay/cert/apiclient_key.pem');//证书位置 curl_setopt($ch, CURLOPT_CAINFO, 'PEM'); curl_setopt($ch, CURLOPT_CAINFO, 'D:/phpStudy/PHPTutorial/WWW/wxpay/cert/rootca.pem'); if (count($aHeader) >= 1) { curl_setopt($ch, CURLOPT_HTTPHEADER, $aHeader);//设置头部 } curl_setopt($ch, CURLOPT_POST, 1);//post提交方式 curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);//全部数据使用HTTP协议中的"POST"操作来发送 $data = curl_exec($ch);//执行回话 if ($data) { curl_close($ch); return $data; } else { $error = curl_errno($ch); echo "call faild, errorCode:$error\n"; curl_close($ch); return false; } }
2019-10-01 - 怎么清除用户登陆状态?
用开发工具登陆后,再用手机登陆, 工具内就获取不到openid了, 但用 wx.checkSession({ success: function () { console.log('未过期') }, fail: function () { console.log('已过期') } }) 这段代码 还显示状态未过期。 这样一直获取不到openid 我想获取不到openid的时候 就清空一遍登陆状态 怎么解决?
2019-09-27 - 没有申请直播权限,能先做开发测试吗?
没有申请直播权限,能先做开发测试吗? 该怎样做?
2019-09-21 - 更新了一下工具导入项目报错了?
[图片] 更新之前是正常的,更新工具之后就这样了,咋回事啊?
2019-09-19 - 自定义的属性为啥获取不到啊,dataset里啥都没有?
<view class="shop_row" wx:for="{{shop}}" data-index='{{index}}' wx:key> {type: "tap", timeStamp: 5344, target: {…}, currentTarget: {…}, mark: {…}, …} changedTouches: [{…}] currentTarget: dataset: {} id: "" offsetLeft: 256 offsetTop: 592 __proto__: Object detail: {x: 328, y: 608} mark: {} target: {id: "", offsetLeft: 256, offsetTop: 592, dataset: {…}} timeStamp: 5344 touches: [{…}] type: "tap"
2019-09-06 - margin-top开发工具跟安卓手机上为何不一致呢?
[图片] [图片] 第一张是安卓手机的,第二张是开发工具上的,用的margin-top为何显示的位置不一样啊?要怎么解决一下
2019-09-06