mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 03:35:06 +08:00
- 新增 RechargeCmd 类用于处理充值命令 - 新增 RechargeDto 类用于表示充值交易数据 - 新增 OrderAction、OrderStatus 和 PayType 枚举类 - 新增 OrderRepoInterface接口和 OrderRepo 实现类,用于处理订单相关操作 - 更新 ConfigProvider,添加新依赖项 - 新增 CreateRechargeOrderTest 测试用例
45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Hyperf\Config\Config;
|
|
use Hyperf\Context\ApplicationContext;
|
|
use Hyperf\Contract\ConfigInterface;
|
|
use Hyperf\Di\ClassLoader;
|
|
use Hyperf\Di\Container;
|
|
use Hyperf\Di\Definition\DefinitionSource;
|
|
use Swoole\Runtime;
|
|
|
|
use function Hyperf\Support\env;
|
|
use function Hyperf\Support\make;
|
|
|
|
ini_set('display_errors', 'on');
|
|
ini_set('display_startup_errors', 'on');
|
|
|
|
error_reporting(E_ALL);
|
|
date_default_timezone_set('Asia/Shanghai');
|
|
|
|
|
|
!defined('BASE_PATH') && define('BASE_PATH', dirname(__DIR__, 1));
|
|
!defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
|
|
|
|
Runtime::enableCoroutine(SWOOLE_HOOK_FLAGS);
|
|
|
|
require BASE_PATH . '/vendor/autoload.php';
|
|
ClassLoader::init();
|
|
|
|
$container = new Container(new DefinitionSource([]));
|
|
$container = ApplicationContext::setContainer($container);
|
|
|
|
/** @var Config $config */
|
|
$config = make(Config::class, [
|
|
[
|
|
'app_name' => 'LuxDesign',
|
|
'dependencies' => [],
|
|
'payment' => [
|
|
'base_uri' => env('LUX_PAY_BASE_URI', 'http://test-pay.luxcreo.com'),
|
|
],
|
|
],
|
|
]);
|
|
ApplicationContext::getContainer()->set(ConfigInterface::class, $config);
|