增加event
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user