// 调起支付
public function pay(Request $request)
{
    $openid  = $request->param('openid', 0);
    $orderNo = $request->param('orderNo', 0);

    $findOrder = Db::table('gc_order')->where(['orderNo' => $orderNo, 'openid' => $openid])->find();
    if (!$findOrder) {
        return self::err('订单不存在');
    }

    $findUser = Db::table('data_user')->where('openid', $openid)->find();
    if (!$findUser) {
        return self::err('用户不存在');
    }
    $tt_pay_app_id     = sysconf('wechat.dy_apppid');
    $tt_merchant_id    = sysconf('wechat.dy_mch_id');
    $tt_pay_secret_key = $app_secret = sysconf('wechat.dy_appsecret');
    $ip                = $this->getRealIp();
    $risk_info         = [
        'ip' => $ip,
    ];
    $orderInfo = [
        "app_id"       => $tt_pay_app_id,
 

版权声明:本文为weixin_47661619原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_47661619/article/details/115342945