Closed Niexiawei closed 5 years ago
2.7
支付宝扫码支付 出现INVALID_SIGN: Alipay Sign Verify FAILED 但是捕获错误中的qr_code可以进行支付 若使用web支付正常
class payment {
private $pays; public function __construct() { $this->pays = Pay::alipay(config('pay.alipay')); } public function rechargeOrders(UserOrder $order){ $info =[ 'out_trade_no' => $order->orders_id, 'total_amount' => $order->amount, 'subject' => '充值余额' . $order->detail['amount'] . '元', ]; return $this->pays->scan($info); } public function alipay(){ return $this->pays; } public function web(UserOrder $order){ $info =[ 'out_trade_no' => $order->orders_id, 'total_amount' => $order->amount, 'subject' => '充值余额' . $order->detail['amount'] . '元', ]; return $this->pays->web($info); } public function close($oid){ $order = [ 'out_trade_no' => $oid, ]; $this->pays->close($order); }
}
2019-04-24 10:34:06 > yansongda.pay.WARNING > Alipay Sign Verify FAILED {"alipay_trade_precreate_response":{"code":"10000","msg":"Success","out_trade_no":"RC201904161455175cb57c55157b6","qr_code":"https://qr.alipay.com/bax09821octhpo3eesac00cb"},"sign":"Lz8a36UvXhb4njmUNQObyRT+DiZgk5pnMFPd/KS1Ahk+Yb9cNgXCcE29myThrrSX14VLAvfIoz+ZfrGiCCwTEcCIoKZT/sDR60FZb7At1UEbXCoruBnrEXm5zUrcrhroATiSdoRm5Kh1RVV6/fIO02oNimBcbRfp2vEk4jOoXi8GlAviRujTAZfxnQClYqORkf60UmZELnWbaH+MTMKwTwHTv6m60haY7Q2F9NvzqOuB/ufebNJ3KjkgwpeFMyr0sJ7uwThObAEa0ujUgi5lM9tuCNMwhP3oz9xj9JB/fL9JDfE5XbxNy49TpC2/xPHcS1kVnMCkQEzbMtXViL2Q5g=="}
2019-04-24 10:34:06 > yansongda.pay.INFO > Alipay Scan Has Started ["https://openapi.alipay.com/gateway.do",{"app_id":"2019041063845295","format":"JSON","charset":"utf-8","sign_type":"RSA2","version":"1.0","return_url":"https://delivery.nicoi.cn/message/pay/alipay","notify_url":"https://delivery.nicoi.cn/message/pay/alipay","timestamp":"2019-04-24 10:34:06","biz_content":"{\"out_trade_no\":\"RC201904161455175cb57c55157b6\",\"total_amount\":260,\"subject\":\"\u5145\u503c\u4f59\u989d300\u5143\",\"product_code\":\"\"}","method":"alipay.trade.precreate","sign":"RhTfpLZomUrrL67JZ+ZSU0Bf54dFcFZxfK5834P2DytZw7xvgjV278cLQGelUMQ/9sF4ECUJbT4Geo4ureTHdvCt2mLOPX7/TB+QLC/7wCt9HNAWZPhhmP+dawT+fXsAEGhKQTSQT6kswrYQQ/kg5cnPX+N9G3XWNlaonp3KLpANe4SWhGRjWn0WYT1shdLtVZRkxyO8YbxgUhhAQCG/xPF/q8P7DYZKJ68q4svSoQ3UXotPSdAwpEqSVOEG0v4fN4B3lrjZ/xwEDPPC5ghR/VZERg4221ceRsByMrACvDFlDAmYcWglAjrpFsISBpPw2Hgu+YVRHOludXO8L/z3/A=="}]
涉及到 异步通知、同步通知 的问题,请贴出来
请仔细查看文档
感谢支持
包版本号
2.7
问题描述
支付宝扫码支付 出现INVALID_SIGN: Alipay Sign Verify FAILED 但是捕获错误中的qr_code可以进行支付 若使用web支付正常
你的代码
class payment {
}
报错详情
2019-04-24 10:34:06 > yansongda.pay.WARNING > Alipay Sign Verify FAILED {"alipay_trade_precreate_response":{"code":"10000","msg":"Success","out_trade_no":"RC201904161455175cb57c55157b6","qr_code":"https://qr.alipay.com/bax09821octhpo3eesac00cb"},"sign":"Lz8a36UvXhb4njmUNQObyRT+DiZgk5pnMFPd/KS1Ahk+Yb9cNgXCcE29myThrrSX14VLAvfIoz+ZfrGiCCwTEcCIoKZT/sDR60FZb7At1UEbXCoruBnrEXm5zUrcrhroATiSdoRm5Kh1RVV6/fIO02oNimBcbRfp2vEk4jOoXi8GlAviRujTAZfxnQClYqORkf60UmZELnWbaH+MTMKwTwHTv6m60haY7Q2F9NvzqOuB/ufebNJ3KjkgwpeFMyr0sJ7uwThObAEa0ujUgi5lM9tuCNMwhP3oz9xj9JB/fL9JDfE5XbxNy49TpC2/xPHcS1kVnMCkQEzbMtXViL2Q5g=="}
sdk 日志
2019-04-24 10:34:06 > yansongda.pay.INFO > Alipay Scan Has Started ["https://openapi.alipay.com/gateway.do",{"app_id":"2019041063845295","format":"JSON","charset":"utf-8","sign_type":"RSA2","version":"1.0","return_url":"https://delivery.nicoi.cn/message/pay/alipay","notify_url":"https://delivery.nicoi.cn/message/pay/alipay","timestamp":"2019-04-24 10:34:06","biz_content":"{\"out_trade_no\":\"RC201904161455175cb57c55157b6\",\"total_amount\":260,\"subject\":\"\u5145\u503c\u4f59\u989d300\u5143\",\"product_code\":\"\"}","method":"alipay.trade.precreate","sign":"RhTfpLZomUrrL67JZ+ZSU0Bf54dFcFZxfK5834P2DytZw7xvgjV278cLQGelUMQ/9sF4ECUJbT4Geo4ureTHdvCt2mLOPX7/TB+QLC/7wCt9HNAWZPhhmP+dawT+fXsAEGhKQTSQT6kswrYQQ/kg5cnPX+N9G3XWNlaonp3KLpANe4SWhGRjWn0WYT1shdLtVZRkxyO8YbxgUhhAQCG/xPF/q8P7DYZKJ68q4svSoQ3UXotPSdAwpEqSVOEG0v4fN4B3lrjZ/xwEDPPC5ghR/VZERg4221ceRsByMrACvDFlDAmYcWglAjrpFsISBpPw2Hgu+YVRHOludXO8L/z3/A=="}]
nginx/apache 日志