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

测试

... ... @@ -6,16 +6,6 @@ use think\Db;
class PayController extends HomeBaseController
{
function _initialize()
{
parent::_initialize(); // TODO: Change the autogenerated stub
if (empty(session('user.id'))) {
$this->error('登录失败');
} else {
require_once EXTEND_PATH . '/Payment.php';
}
}
//提交订单
public function done()
{
... ... @@ -82,12 +72,14 @@ class PayController extends HomeBaseController
//微信支付
public function wxPay($info)
{
require_once EXTEND_PATH . '/Payment.php';
$pay = new \Payment($info['attach'], $info['openid'], $info['body'], 1);
$this->success('ok', url('user/center/orderlist'), $pay->pay());
}
public function notify()
{
require_once EXTEND_PATH . '/Payment.php';
$pay = new \Payment();
$notify = $pay->handleNotify();
if(!empty($notify)) {
... ...