支付宝
parent
5f97414495
commit
cc3c4cf159
|
|
@ -3,10 +3,33 @@
|
|||
namespace App\Endpoint\Callback\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class AlipayController extends Controller
|
||||
{
|
||||
/**
|
||||
* 支付通知
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function paidNotify(Request $request)
|
||||
{
|
||||
$this->log('paid notify', $request->all());
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信回调日志
|
||||
*
|
||||
* @param string $message
|
||||
* @param array $context
|
||||
* @return void
|
||||
*/
|
||||
protected function log(string $message, array $context = [])
|
||||
{
|
||||
return Log::build([
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/alipay-notify.log'),
|
||||
])->info($message, $context);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ class AlipayService
|
|||
$params['total_amount'],
|
||||
);
|
||||
|
||||
return $result->body;
|
||||
return [
|
||||
'body' => $result->body,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue