|
|
@@ -100,23 +100,24 @@ class NotifyController extends webApp
|
|
|
|
|
|
// 验签和重组参数
|
|
|
$data = $result;
|
|
|
- RedisService::set("caches:payments:notify_{$productId}:data_" . $key, ['all' => request()->all(),'product_id' => $productId, 'result' => $result], 7200);
|
|
|
+ RedisService::set("caches:payments:payNotify_{$productId}:data_" . $key, ['all' => request()->all(),'product_id' => $productId, 'result' => $result], 7200);
|
|
|
if (env('APP_DEBUG')) {
|
|
|
logger()->channel($channel)->info("【{$date} 支付回调】验证结果:" . json_encode(['data' => $data,'product_id' => $productId],256));
|
|
|
}
|
|
|
|
|
|
// 回调处理
|
|
|
if (PaymentService::make()->catchPayNotify($productId, $data)) {
|
|
|
- RedisService::set("caches:payments:notify_{$productId}:success_" . $key, ['all' => request()->all(), 'product_id' => $productId, 'result' => $result], 7200);
|
|
|
- logger()->channel('alipay')->info("【{$date} 支付回调】回调成功:" . json_encode(['data' => $data,'product_id' => $productId],256));
|
|
|
+ RedisService::set("caches:payments:payNotify_{$productId}:success_" . $key, ['all' => request()->all(), 'product_id' => $productId, 'result' => $result], 7200);
|
|
|
+ logger()->channel($channel)->info("【{$date} 支付回调】回调成功:" . json_encode(['data' => $data,'product_id' => $productId],256));
|
|
|
return response('success');
|
|
|
} else {
|
|
|
$msg = PaymentService::make()->getError();
|
|
|
+ RedisService::set("caches:payments:payNotify_{$productId}:success_" . $key, ['msg'=>$msg,'all' => request()->all(), 'product_id' => $productId, 'result' => $result], 7200);
|
|
|
logger()->channel($channel)->info("【{$date} 支付回调】回调失败:" . json_encode(['data' => $data,'product_id' => $productId, 'error' => lang($msg)], 256));
|
|
|
return message($msg ? $msg : 2635, false);
|
|
|
}
|
|
|
} catch (\Exception $exception) {
|
|
|
- RedisService::set("caches:payments:notify_{$productId}:error_" . $key, ['all' => request()->all(), 'product_id' => $productId, 'error' => $exception->getMessage(), 'data' => $result], 7200);
|
|
|
+ RedisService::set("caches:payments:payNotify_{$productId}:error_" . $key, ['all' => request()->all(), 'product_id' => $productId, 'error' => $exception->getMessage(), 'data' => $result], 7200);
|
|
|
logger()->channel($channel)->error("【{$date} 支付回调】回调错误:" . json_encode(['data' => $result,'product_id' => $productId, 'error' => $exception->getMessage()], 256));
|
|
|
return message(2635, false, ['error' => $exception->getMessage()]);
|
|
|
}
|