Store the customized Shopro mall so it can be kept on the remote.

Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
wikiboss
2026-09-22 13:55:12 +08:00
当前提交 b87880e247
共有 2547 个文件被更改,包括 423496 次插入 和 0 次删除

查看文件

@@ -0,0 +1,19 @@
<?php
namespace Yansongda\Pay\Exceptions;
class BusinessException extends GatewayException
{
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
*/
public function __construct($message, $raw = [])
{
parent::__construct('ERROR_BUSINESS: '.$message, $raw, self::ERROR_BUSINESS);
}
}

查看文件

@@ -0,0 +1,44 @@
<?php
namespace Yansongda\Pay\Exceptions;
class Exception extends \Exception
{
const UNKNOWN_ERROR = 9999;
const INVALID_GATEWAY = 1;
const INVALID_CONFIG = 2;
const INVALID_ARGUMENT = 3;
const ERROR_GATEWAY = 4;
const INVALID_SIGN = 5;
const ERROR_BUSINESS = 6;
/**
* Raw error info.
*
* @var array
*/
public $raw;
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
* @param int|string $code
*/
public function __construct($message = '', $raw = [], $code = self::UNKNOWN_ERROR)
{
$message = '' === $message ? 'Unknown Error' : $message;
$this->raw = is_array($raw) ? $raw : [$raw];
parent::__construct($message, intval($code));
}
}

查看文件

@@ -0,0 +1,20 @@
<?php
namespace Yansongda\Pay\Exceptions;
class GatewayException extends Exception
{
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
* @param int $code
*/
public function __construct($message, $raw = [], $code = self::ERROR_GATEWAY)
{
parent::__construct('ERROR_GATEWAY: '.$message, $raw, $code);
}
}

查看文件

@@ -0,0 +1,19 @@
<?php
namespace Yansongda\Pay\Exceptions;
class InvalidArgumentException extends Exception
{
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
*/
public function __construct($message, $raw = [])
{
parent::__construct('INVALID_ARGUMENT: '.$message, $raw, self::INVALID_ARGUMENT);
}
}

查看文件

@@ -0,0 +1,19 @@
<?php
namespace Yansongda\Pay\Exceptions;
class InvalidConfigException extends Exception
{
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
*/
public function __construct($message, $raw = [])
{
parent::__construct('INVALID_CONFIG: '.$message, $raw, self::INVALID_CONFIG);
}
}

查看文件

@@ -0,0 +1,19 @@
<?php
namespace Yansongda\Pay\Exceptions;
class InvalidGatewayException extends Exception
{
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
*/
public function __construct($message, $raw = [])
{
parent::__construct('INVALID_GATEWAY: '.$message, $raw, self::INVALID_GATEWAY);
}
}

查看文件

@@ -0,0 +1,19 @@
<?php
namespace Yansongda\Pay\Exceptions;
class InvalidSignException extends Exception
{
/**
* Bootstrap.
*
* @author yansongda <me@yansonga.cn>
*
* @param string $message
* @param array|string $raw
*/
public function __construct($message, $raw = [])
{
parent::__construct('INVALID_SIGN: '.$message, $raw, self::INVALID_SIGN);
}
}