初始化项目:添加后端代码、ThinkPHP框架、前端资源
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user