58 lines
1.5 KiB
PHP
Executable File
58 lines
1.5 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Controllers\Api\External;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Jobs\HandleAgentAlipayResultNotice;
|
|
use App\Jobs\HandleAlipayResultNotice;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class AliController extends Controller
|
|
{
|
|
public function notifyCallback(Request $request) {
|
|
Log::info('ali支付回调参数', $request->all());
|
|
$data = $request->all();
|
|
HandleAlipayResultNotice::dispatch($data);
|
|
}
|
|
|
|
|
|
public function authRedirect(Request $request)
|
|
{
|
|
Log::info('ali授权回调参数', $request->all());
|
|
|
|
}
|
|
|
|
public function agentNotifyCallback(Request $request) {
|
|
Log::info('ali代开发支付回调参数', $request->all());
|
|
$data = $request->all();
|
|
HandleAgentAlipayResultNotice::dispatch($data);
|
|
}
|
|
|
|
public function agentAuthRedirect(Request $request)
|
|
{
|
|
Log::info('ali代开发授权回调参数', $request->all());
|
|
|
|
|
|
|
|
$param = [
|
|
'grant_type' => 'authorization_code',
|
|
'app_auth_code' => 'Pa7f62411b8c642c7a2a546ede28b786',
|
|
// 'app_id' => '2021003199692625',
|
|
];
|
|
|
|
$text = [];
|
|
$param = [
|
|
'auth_app_id' => '2021003199692625'
|
|
];
|
|
|
|
// dd(Factory::payment());
|
|
// dd(Factory::util());
|
|
// $res = Factory::util()->generic()->execute('alipay.open.auth.token.app', $text, $param);
|
|
// $res = Factory::util()->generic()->execute('alipay.open.auth.appauth.invite.create', $text, $param);
|
|
//
|
|
// dump($res);
|
|
|
|
}
|
|
}
|