yzslab / whmcs-wechatpay

WHMCS WeChat Pay Gateway Module
Apache License 2.0
8 stars 6 forks source link

帮帮忙,生成的二维码失败,System Activity Log无记录 #2

Closed wangold closed 3 years ago

wangold commented 3 years ago

会不会是viewinvoice页面显示这个的问题?但其他页面没有显示这个:“Warning: The WHMCS Base URL definition is missing from your active template. Please refer to https://docs.whmcs.com/WHMCS_Base_URL_Template_Variable for more information and details of how to resolve this warning.”

gqrf

谢谢🙏 一切因为您出的这个微信支付才试试WHMCS, 希望它顺利运行!

wangold commented 3 years ago

会不会是viewinvoice页面显示这个的问题?但其他页面没有显示这个:“Warning: The WHMCS Base URL definition is missing from your active template. Please refer to https://docs.whmcs.com/WHMCS_Base_URL_Template_Variable for more information and details of how to resolve this warning.”

gqrf

谢谢🙏 一切因为您出的这个微信支付才试试WHMCS, 希望它顺利运行!

我用的版本是v8.1.0 @yzslab

yzslab commented 3 years ago

Log页面的路径是/admin/systemactivitylog.php

yzslab commented 3 years ago

如果实在没记录日志的话,你改一下这个文件的第174行,直接输出Exception的信息看看:https://github.com/yzslab/whmcs-wechatpay/blob/master/wechatpay.php#L174

wangold commented 3 years ago

如果实在没记录日志的话,你改一下这个文件的第174行,直接输出Exception的信息看看:https://github.com/yzslab/whmcs-wechatpay/blob/master/wechatpay.php#L174

现在出现这个,怎么办? message: 错误的签名,验签失败, code: SIGN_ERROR, file:/home/mj/public_html/modules/gateways/WeChatPay/src/WeChatPayAPIv3.php, line: #84 #0 /home/mj/public_html/modules/gateways/WeChatPay/src/WeChatPayAPIv3.php(52): YunInternet\WHMCS\WeChatPay\WeChatPayAPIv3->sendRequest('POST', 'pay/transaction...', Array) #1 /home/mj/public_html/modules/gateways/WeChatPay/src/WeChatPayAPIv3.php(31): YunInternet\WHMCS\WeChatPay\WeChatPayAPIv3->sendJSONRequest('pay/transaction...', Array) #2 /home/mj/public_html/modules/gateways/wechatpay.php(135): YunInternet\WHMCS\WeChatPay\WeChatPayAPIv3->nativePay(Array) #3 /home/mj/public_html/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): wechatpay_link(Array) #4 /home/mj/public_html/vendor/whmcs/whmcs-foundation/lib/Module/Gateway.php(0): WHMCS\Module\AbstractModule->call('link', Array) #5 /home/mj/public_html/vendor/whmcs/whmcs-foundation/lib/Invoice.php(0): WHMCS\Module\Gateway->call('link', Array) #6 /home/mj/public_html/viewinvoice.php(0): WHMCS\Invoice->getPaymentLink() #7 {main}

yzslab commented 3 years ago

应该是设置里面填的私钥不对吧

wangold commented 3 years ago

应该是设置里面填的私钥不对吧

我的另一个站用的也是同一个私钥,那个没问题啊,啊v2、v3! 我再试试,总之非常感谢!您太好了!

wangold commented 3 years ago

能留个联系方式吗?或者请您吃早点,有没有“咖啡”链接?:) @yzslab

yzslab commented 3 years ago

能留个联系方式吗?或者请您吃早点,有没有“咖啡”链接?:) @yzslab

你把你QQ发到我邮箱吧:yuan@zhensheng.im

yzslab commented 3 years ago

这个,暂时只能确定是填的私钥的问题,签名用的是那个私钥:https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay4_0.shtml

APIv3只能使用“权威CA”证书,你在API安全页面的API证书处看看是不是“权威CA颁发”,再看看证书序列号填的对不对。

wangold commented 3 years ago

这个,暂时只能确定是填的私钥的问题,签名用的是那个私钥:https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay4_0.shtml

APIv3只能使用“权威CA”证书,你在API安全页面的API证书处看看是不是“权威CA颁发”,再看看证书序列号填的对不对。

好的,刚刚生成了一个,浏览器没反应关闭了生成的工具,等48小时后,再试一试后回复您。