衷心感谢改版期间大家给予的帮助和体谅

微信登录

微信登录

因恶意注册过多,目前只支持微信模式
付费课程, 订阅后即可观看
正在播放:添加支付宝在线扫码支付功能
发布于: 2018.12.27
renzhifan 2019.01.22 23:43

Alipay Sign Verify FAILED

/home/vagrant/code/laravel_pay/vendor/yansongda/pay/src/Gateways/Alipay.php if (is_null($data)) { $request = Request::createFromGlobals();

        $data = $request-&gtrequest-&gtcount() &gt 0 ? $request-&gtrequest-&gtall() : $request-&gtquery-&gtall();
        $data = Support::encoding($data, 'utf-8', $data['charset'] ?? 'gb2312');
    }

    if (isset($data['fund_bill_list'])) {
        $data['fund_bill_list'] = htmlspecialchars_decode($data['fund_bill_list']);
    }

    Events::dispatch(Events::REQUEST_RECEIVED, new Events\RequestReceived('Alipay', '', $data));

    if (Support::verifySign($data)) {
        return new Collection($data);
    }

    Events::dispatch(Events::SIGN_FAILED, new Events\SignFailed('Alipay', '', $data));

    throw new InvalidSignException('Alipay Sign Verify FAILED', $data);
}
renzhifan 2019.01.22 23:44

csrf 验证 我在app/Http/kernel 中去掉了也

codinget 2019.01.22 23:48

这个跟csrf应该没啥关系,是签名验证失败了,你确认一下公钥私钥填写是不是正确,还有是不是打开了沙箱模式,问题应该出在这里,我们在项目配置文件填写支付宝的公钥,千万不要填写应用的公钥

renzhifan 2019.01.22 23:56

没有开启沙箱模式

renzhifan 2019.01.22 23:55

2019-01-22 15:50:47 &gt yansongda.pay.WARNING &gt Alipay Sign Verify FAILED {"charset":"GBK","out_trade_no":"15481722235c473bbfd7ef5","method":"alipay.trade.page.pay.return","total_amount":"0.01","sign":"OxDhyB6SaH8yoCf2z4OwfHORedaMoHps5YEN2WU5S08G6DYH3z/0zWJ+acpXm04PU3/ZLii8w12csJo0UrbCN1VYJE/x5V+JAha7tG8c+s6fS7bJKYWOKOOG9ijy4hXduJ0xNrfTL57lmChwNdj5bQrOIFEISyEBufcbMpLpcV+exFAH1NurkDe68sBzDhsxP2ME8RptUVrO41uxPDS4DIsEXKl/boFJDcHfpwuTty8zXM43GBocYLb3VJnnVPLuiR/2xbybYg2V+jzHvb5YeyUxfXo3m1zNdkqfD1icODqfFF/bw52ev847aWOjaMY06Yixr5fRImjC+Wlcev7BKg==","trade_no":"2019012222001415221011500013","auth_app_id":"2017010604893373","version":"1.0","app_id":"2017010604893373","sign_type":"RSA2","seller_id":"2088911546703822","timestamp":"2019-01-22 23:50:44"}

codinget 2019.01.23 00:01

charset有问题,应该是UTF-8的才对,你把你网页的meta信息检查一下

renzhifan 2019.01.23 00:12

检查了下 meta 没问题

codinget 2019.01.23 00:03

你也可以在杨嵩达的支付开发包github那里找一找肯定有人遇到过这个问题,应该可以找到解决方案,遇到问题再那里更容易找到解决方法。毕竟我遇到过的问题肯定不如一群人遇到的问题多,集体的力量更大啊

renzhifan 2019.01.23 00:12

好的 多谢

codinget 2019.01.23 00:14

兄弟,别熬夜了,早点睡吧

yang 2020.02.03 21:23

想错了

标 题
找一条适合自己的路,坚持走下去
编程原力 京ICP备17045322号-2
版权所有, 侵权者追究法律责任