增加event

This commit is contained in:
2022-03-04 15:21:01 +08:00
parent 4eefe95576
commit c3461e1335
4 changed files with 132 additions and 17 deletions

View File

@@ -15,6 +15,14 @@ class PetroController
{
try {
//获取动态码
$res = Petro::Check()->setParams([
'ticketNum' => '61578832475977235',
'random' => Str::random(6),
])->start();
dd($res);
// $res = Petro::Bill()->setParams([
// 'matchDate' => Carbon::now()->format('Ymd'),
// 'pageNo' => 1,

View File

@@ -19,7 +19,7 @@ class TestController
public function index(Request $request)
{
$str = Str::uuid();
$date = $request->date ?? date('Y-m-d');
$time = Carbon::parse($date);

View File

@@ -5,6 +5,8 @@ namespace App\Providers;
use App\Events\ConponCallback;
use App\Listeners\ConponCallbackListener;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use XuanChen\Petro\Kernel\Event\CouponNotice;
use XuanChen\Petro\Kernel\Listeners\PetroConponNoticeListener;
use XuanChen\UnionPay\Event\UnionpayConponCallback;
use XuanChen\UnionPay\Listeners\UnionpayConponCallbackListener;
@@ -13,6 +15,7 @@ class EventServiceProvider extends ServiceProvider
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
@@ -22,11 +25,14 @@ class EventServiceProvider extends ServiceProvider
UnionpayConponCallback::class => [
UnionpayConponCallbackListener::class,
],
CouponNotice::class => [
PetroConponNoticeListener::class,
],
];
/**
* Register any events for your application.
*
* @return void
*/
public function boot()