2025-08-06 13:32:09 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
2025-08-12 14:46:31 +08:00
|
|
|
use App\Facades\UtilService;
|
|
|
|
|
use App\Facades\WechatPayService;
|
2026-04-27 11:15:42 +08:00
|
|
|
use App\Helpers\TokenHelper;
|
2025-08-06 13:32:09 +08:00
|
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
|
|
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
|
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
|
|
|
use Illuminate\Routing\Controller as BaseController;
|
2026-04-27 11:15:42 +08:00
|
|
|
use Log;
|
2025-08-06 13:32:09 +08:00
|
|
|
|
|
|
|
|
class Controller extends BaseController
|
|
|
|
|
{
|
|
|
|
|
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
2025-08-06 16:03:12 +08:00
|
|
|
|
|
|
|
|
public function test()
|
|
|
|
|
{
|
2026-04-23 15:32:04 +08:00
|
|
|
// $trade_no1 = UtilService::getTradeNo();
|
|
|
|
|
// $trade_no2 = UtilService::getTradeNo();
|
2025-08-13 13:58:48 +08:00
|
|
|
|
2026-04-23 15:32:04 +08:00
|
|
|
// $scene_id = config("wechatpay.screen.commission");
|
|
|
|
|
// $openid = "oPC_2vneOWpQbicNZQAUCxuwZ4mw";
|
|
|
|
|
// $amount = 10;
|
|
|
|
|
// $remark = "测试";
|
|
|
|
|
// // $res = WechatPayService::transferBatches($trade_no1, $trade_no2, $openid, $amount, $remark);
|
|
|
|
|
// $res = WechatPayService::mchTransfer($trade_no1, $scene_id, $openid, $amount, $remark);
|
|
|
|
|
// dd($res);
|
2026-04-27 11:15:42 +08:00
|
|
|
|
|
|
|
|
$token = TokenHelper::generate(123);
|
|
|
|
|
|
|
|
|
|
Log::info($token);
|
|
|
|
|
|
|
|
|
|
$res = TokenHelper::verify($token);
|
|
|
|
|
dd($res);
|
2025-08-12 17:34:04 +08:00
|
|
|
}
|
2025-08-06 13:32:09 +08:00
|
|
|
}
|