- 框架初始化
 - 安装插件
 - 修复PHP8.4报错
This commit is contained in:
2025-04-19 17:21:20 +08:00
commit c6a4e1f5f6
5306 changed files with 967782 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Yansongda\Pay\Events;
class ApiRequested extends Event
{
/**
* Endpoint.
*
* @var string
*/
public $endpoint;
/**
* Result.
*
* @var array
*/
public $result;
/**
* Bootstrap.
*/
public function __construct(string $driver, ?string $gateway, ?string $endpoint, ?array $result)
{
$this->endpoint = $endpoint;
$this->result = $result;
parent::__construct($driver, $gateway);
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace Yansongda\Pay\Events;
class ApiRequesting extends Event
{
/**
* Endpoint.
*
* @var string
*/
public $endpoint;
/**
* Payload.
*
* @var array
*/
public $payload;
/**
* Bootstrap.
*/
public function __construct(string $driver, ?string $gateway, ?string $endpoint, ?array $payload)
{
$this->endpoint = $endpoint;
$this->payload = $payload;
parent::__construct($driver, $gateway);
}
}

View File

@@ -0,0 +1,40 @@
<?php
namespace Yansongda\Pay\Events;
use Symfony\Contracts\EventDispatcher\Event as SymfonyEvent;
class Event extends SymfonyEvent
{
/**
* Driver.
*
* @var string
*/
public $driver;
/**
* Method.
*
* @var string
*/
public $gateway;
/**
* Extra attributes.
*
* @var mixed
*/
public $attributes;
/**
* Bootstrap.
*
* @author yansongda <me@yansongda.cn>
*/
public function __construct(string $driver, ?string $gateway)
{
$this->driver = $driver;
$this->gateway = $gateway;
}
}

View File

@@ -0,0 +1,33 @@
<?php
namespace Yansongda\Pay\Events;
class MethodCalled extends Event
{
/**
* endpoint.
*
* @var string
*/
public $endpoint;
/**
* payload.
*
* @var array
*/
public $payload;
/**
* Bootstrap.
*
* @author yansongda <me@yansongda.cn>
*/
public function __construct(string $driver, ?string $gateway, ?string $endpoint, ?array $payload = [])
{
$this->endpoint = $endpoint;
$this->payload = $payload;
parent::__construct($driver, $gateway);
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace Yansongda\Pay\Events;
class PayStarted extends Event
{
/**
* Endpoint.
*
* @var string
*/
public $endpoint;
/**
* Payload.
*
* @var array
*/
public $payload;
/**
* Bootstrap.
*/
public function __construct(string $driver, ?string $gateway, ?string $endpoint, ?array $payload)
{
$this->endpoint = $endpoint;
$this->payload = $payload;
parent::__construct($driver, $gateway);
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace Yansongda\Pay\Events;
class PayStarting extends Event
{
/**
* Params.
*
* @var array
*/
public $params;
/**
* Bootstrap.
*/
public function __construct(string $driver, ?string $gateway, ?array $params)
{
$this->params = $params;
parent::__construct($driver, $gateway);
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace Yansongda\Pay\Events;
class RequestReceived extends Event
{
/**
* Received data.
*
* @var array
*/
public $data;
/**
* Bootstrap.
*
* @author yansongda <me@yansongda.cn>
*/
public function __construct(string $driver, ?string $gateway, ?array $data)
{
$this->data = $data;
parent::__construct($driver, $gateway);
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace Yansongda\Pay\Events;
class SignFailed extends Event
{
/**
* Received data.
*
* @var array
*/
public $data;
/**
* Bootstrap.
*
* @author yansongda <me@yansongda.cn>
*/
public function __construct(string $driver, ?string $gateway, ?array $data)
{
$this->data = $data;
parent::__construct($driver, $gateway);
}
}