修改文件:extend\service\AlipayTradeWapService
修改方法:AliPayNotify()
protected function AliPayNotify(callable $notifyFn)
{
$post = Request::instance()->post();
//卡劵红包类
$voucher_detail_list = Request::instance()->param('voucher_detail_list');
if ($voucher_detail_list) {
$post['voucher_detail_list'] = $voucher_detail_list;
}
$result = self::AliPaycheck($post);
if ($result) {
//商户订单号
$post['out_trade_no'] = isset($post['out_trade_no']) ? $post['out_trade_no'] : '';
//支付宝交易号
$post['trade_no'] = isset($post['trade_no']) ? $post['trade_no'] : '';
//交易状态
$post['trade_status'] = isset($post['trade_status']) ? $post['trade_status'] : '';
//备注
$post['attach'] = isset($post['passback_params']) ? urldecode($post['passback_params']) : '';
//异步回调成功执行
try {
if (is_callable($notifyFn)) $notifyFn((object)$post, $result);
} catch (\Exception $e) {
self::$isDeBug && self::WriteLog('支付宝支付成功,订单号为:' . $post['out_trade_no'] . '.回调报错:' . $e->getMessage());
}
echo 'success';
} else {
echo 'fail';
}
self::$isDeBug && self::WriteLog($result);
return true;
}
{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}
作者 管理员 企业
{{itemf.name}}
{{itemc.user_info.nickname}}
{{itemc.user_name}}
回复 {{itemc.comment_user_info.nickname}}
{{itemf.name}}