当前位置:
凯发ag旗舰厅登录网址下载 >
编程语言
> php
>内容正文
php
php 微信扫码支付 -凯发ag旗舰厅登录网址下载
凯发ag旗舰厅登录网址下载
收集整理的这篇文章主要介绍了
php 微信扫码支付
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
$count = $count*100;vendor('weixinpc.wxpayapi');//引入vendor('weixinpc.notify');//引入vendor('weixinpc.wxpaynativepay');//引入$notify = new \nativepay();$input = new \wxpayunifiedorder(); //调用统一下单类$input->setbody($data['title']);$input->setattach($data['title']);$input->setout_trade_no($_post['number']);$input->settotal_fee($count);//$input->settotal_fee($count);//$input->settotal_fee("$count");$input->settime_start(date("ymdhis"));$input->settime_expire(date("ymdhis", time() 7200));//$input->setgoods_tag("test");$ss=s('config');$input->setnotify_;$input->settrade_type("native");$input->setproduct_id($_post['number']);$result = $notify->getpay;$url2 = $result["code_url"];
//二维码地址 调用方式
//前台可做一个js定时 每两秒执行 查询是否支付成功 成功后跳转页面等操作'" style="width:200px;height:200px;"/>///微信支付扫码支付 回调地址public function wxhui(){vendor('weixinpc.notify'); $notify = new \paynotifycallback(); $notify->handle(false); $is_success = $notify->issuccess(); $bdata = $is_success['data']; //获取微信回调数据if($is_success['code'] == 1){ $total_fee=$bdata['total_fee']/100;//支付金额$trade_no=$bdata['transaction_id'];//微信订单号$out_trade_no=$bdata['out_trade_no'];//系统订单号$openid=$bdata['openid'];//用户在商户appid下的唯一标识$number = explode('-',$out_trade_no);$type = substr($out_trade_no,0,1);echo 'success';}}//
总结
以上是凯发ag旗舰厅登录网址下载为你收集整理的php 微信扫码支付的全部内容,希望文章能够帮你解决所遇到的问题。
如果觉得凯发ag旗舰厅登录网址下载网站内容还不错,欢迎将凯发ag旗舰厅登录网址下载推荐给好友。
- 上一篇:
- 下一篇: