init
- 框架初始化 - 安装插件 - 修复PHP8.4报错
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
class ApiRequested extends Event
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
class ApiRequesting extends Event
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
class CallbackReceived extends Event
|
||||
{
|
||||
public string $provider;
|
||||
|
||||
public ?array $params = null;
|
||||
|
||||
/**
|
||||
* @var null|array|ServerRequestInterface
|
||||
*/
|
||||
public $contents;
|
||||
|
||||
/**
|
||||
* @param null|array|ServerRequestInterface $contents
|
||||
*/
|
||||
public function __construct(string $provider, $contents, ?array $params = null, ?Rocket $rocket = null)
|
||||
{
|
||||
$this->provider = $provider;
|
||||
$this->contents = $contents;
|
||||
$this->params = $params;
|
||||
|
||||
parent::__construct($rocket);
|
||||
}
|
||||
}
|
||||
17
addons/epay/library/v3/Yansongda/Pay/Event/Event.php
Normal file
17
addons/epay/library/v3/Yansongda/Pay/Event/Event.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
class Event
|
||||
{
|
||||
public ?Rocket $rocket = null;
|
||||
|
||||
public function __construct(?Rocket $rocket = null)
|
||||
{
|
||||
$this->rocket = $rocket;
|
||||
}
|
||||
}
|
||||
25
addons/epay/library/v3/Yansongda/Pay/Event/MethodCalled.php
Normal file
25
addons/epay/library/v3/Yansongda/Pay/Event/MethodCalled.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
class MethodCalled extends Event
|
||||
{
|
||||
public string $provider;
|
||||
|
||||
public string $name;
|
||||
|
||||
public array $params;
|
||||
|
||||
public function __construct(string $provider, ?string $name, ?array $params, ?Rocket $rocket = null)
|
||||
{
|
||||
$this->provider = $provider;
|
||||
$this->name = $name;
|
||||
$this->params = $params;
|
||||
|
||||
parent::__construct($rocket);
|
||||
}
|
||||
}
|
||||
9
addons/epay/library/v3/Yansongda/Pay/Event/PayFinish.php
Normal file
9
addons/epay/library/v3/Yansongda/Pay/Event/PayFinish.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
class PayFinish extends Event
|
||||
{
|
||||
}
|
||||
26
addons/epay/library/v3/Yansongda/Pay/Event/PayStarted.php
Normal file
26
addons/epay/library/v3/Yansongda/Pay/Event/PayStarted.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Event;
|
||||
|
||||
use Yansongda\Pay\Contract\PluginInterface;
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
class PayStarted extends Event
|
||||
{
|
||||
/**
|
||||
* @var PluginInterface[]
|
||||
*/
|
||||
public array $plugins;
|
||||
|
||||
public array $params;
|
||||
|
||||
public function __construct(array $plugins, ?array $params, ?Rocket $rocket = null)
|
||||
{
|
||||
$this->plugins = $plugins;
|
||||
$this->params = $params;
|
||||
|
||||
parent::__construct($rocket);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user