作者 lihan
1 个管道 的构建 通过 耗费 2 秒

微信接入自动部署

... ... @@ -13,11 +13,7 @@ class OrderController extends HomeBaseController
function _initialize()
{
session('user.id', 2);
if (empty(session('user.id'))) {
echo json_encode(['msg' => '登陆失败', 'code' => 40001]);
exit();
}
require_once EXTEND_PATH . '/Payment.php';
}
/**
... ... @@ -331,9 +327,13 @@ class OrderController extends HomeBaseController
//微信支付
private function wxPay($info)
{
require_once EXTEND_PATH . '/Payment.php';
$pay = new \Payment($info['oid'], session('openid'), $info['body'], $info['total_fee']);
$pay->pay();
}
public function notufy() {
$pay = new \Payment();
$pay->handleNotify();
}
}
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@
// [ 入口文件 ]
// 调试模式开关
define("APP_DEBUG", true);
define("APP_DEBUG", false);
// 定义CMF根目录,可更改此目录
define('CMF_ROOT', __DIR__ . '/../');
... ...
... ... @@ -48,7 +48,7 @@ class Payment {
'out_trade_no' => config('MchId').time(),
'total_fee' => $this->total_fee,
'spbill_create_ip' => '114.215.223.17', //终端IP
'notify_url' => 'http://integral.w.bronet.cn/pay/Pay/notify',
'notify_url' => 'http://sami.w.bronet.cn/order/Order/notify',
'openid' => $this->openid,
'trade_type' => 'JSAPI',//交易类型
'attach' => $this->attach
... ...