Browse Source

丰富日志记录字段

develop
李可松 5 years ago
parent
commit
75db1e12b6
  1. 9
      app/Http/Controllers/Api/WxpayController.php

9
app/Http/Controllers/Api/WxpayController.php

@ -29,9 +29,9 @@ class WxpayController
]);
$app = Factory::payment($config);
try {
$response = $app->handlePaidNotify(function ($message, $fail) {
$response = $app->handlePaidNotify(function ($message, $fail) use ($agent_id) {
//TODO 仅测试用
DB::table('pay_debugs')->insert(['content' => json_encode($message)]);
DB::table('pay_debugs')->insert(['agent_id' => $agent_id, 'type' => 1, 'content' => json_encode($message)]);
$this->log($message);
// 请求成功
@ -145,7 +145,10 @@ class WxpayController
]);
$app = Factory::payment($config);
try {
$response = $app->handleRefundedNotify(function ($message, $reqInfo, $fail) {
$response = $app->handleRefundedNotify(function ($message, $reqInfo, $fail) use ($agent_id) {
//TODO 仅测试用
DB::table('pay_debugs')->insert(['agent_id' => $agent_id, 'type' => 2, 'content' => json_encode($message)]);
// 记录一下本地调试
$this->log(['message' => $message, 'reqInfo' => $reqInfo], 'refund');
// 请求成功

Loading…
Cancel
Save