一样代码获取不到微信回调

来源:11-5 打造第一个微信支付demo

fanfan_y

2018-09-07

public function wxpayQCode($id) {
$notify = new NativePay();
$input = new WxPayUnifiedOrder();
$input->setBody(“支付 0.01 元”);
$input->setAttach(“支付 0.01 元”);
$input->setOutTradeNo(WxPayConfig::MCHID.date(“YmdHis”));
$input->setTotalFee(“1”);
$input->setTimeStart(date(“YmdHis”));
$input->setTimeExpire(date(“YmdHis”, time() + 600));
$input->setGoodsTag(“QRCode”);
$input->setNotifyUrl(“http://www.wjblog.xin/index/weixinpay/notify”);
$input->setTradeType(“NATIVE”);
input−>setProductId(input->setProductId(input>setProductId(id);
$result = notify−>getPayUrl(notify->getPayUrl(notify>getPayUrl(input);
if(empty($result[“code_url”])) {
$url = ‘’;
}else {
$url = $result[“code_url”];
}

写回答

1回答

fanfan_y

提问者

2018-09-07

用public下的支付扫码查看日志就可以查看的到!是不是封装的类问题??为什么老是的可以添加到tmp/2.txt.我的不行

0
0

Thinkphp5.0仿百度糯米开发多商家电商平台

【毕设】BAT大牛亲授ThinkPHP 5.0,实战中学透新技能,应用于工作

2439 学习 · 1712 问题

查看课程