first commit

This commit is contained in:
Mr.Qin
2022-08-19 19:48:37 +08:00
commit afdd648b65
3275 changed files with 631084 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
class ApiRequested extends Event
{
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
class ApiRequesting extends Event
{
}

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Rocket;
class CallbackReceived extends Event
{
/**
* @var string
*/
public $provider;
/**
* @var array|\Psr\Http\Message\ServerRequestInterface|null
*/
public $contents;
/**
* @var array|null
*/
public $params;
/**
* Bootstrap.
*
* @param array|\Psr\Http\Message\ServerRequestInterface|null $contents
*/
public function __construct(string $provider, $contents, ?array $params, ?Rocket $rocket)
{
$this->provider = $provider;
$this->contents = $contents;
$this->params = $params;
parent::__construct($rocket);
}
}

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Rocket;
class Event
{
/**
* @var \Yansongda\Pay\Rocket|null
*/
public $rocket;
/**
* Bootstrap.
*/
public function __construct(?Rocket $rocket)
{
$this->rocket = $rocket;
}
}

View File

@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Rocket;
class MethodCalled extends Event
{
/**
* @var string
*/
public $provider;
/**
* @var string
*/
public $name;
/**
* @var array
*/
public $params;
public function __construct(string $provider, string $name, array $params, ?Rocket $rocket)
{
$this->provider = $provider;
$this->name = $name;
$this->params = $params;
parent::__construct($rocket);
}
}

View File

@@ -0,0 +1,9 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
class PayFinish extends Event
{
}

View File

@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Yansongda\Pay\Event;
use Yansongda\Pay\Rocket;
class PayStarted extends Event
{
/**
* @var \Yansongda\Pay\Contract\PluginInterface[]
*/
public $plugins;
/**
* @var array
*/
public $params;
public function __construct(array $plugins, array $params, ?Rocket $rocket)
{
$this->plugins = $plugins;
$this->params = $params;
parent::__construct($rocket);
}
}