mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 05:35:08 +08:00
- 新增 RechargeCmd 类用于处理充值命令 - 新增 RechargeDto 类用于表示充值交易数据 - 新增 OrderAction、OrderStatus 和 PayType 枚举类 - 新增 OrderRepoInterface接口和 OrderRepo 实现类,用于处理订单相关操作 - 更新 ConfigProvider,添加新依赖项 - 新增 CreateRechargeOrderTest 测试用例
27 lines
601 B
PHP
27 lines
601 B
PHP
<?php
|
|
|
|
/**
|
|
* CreateRechargeOrderTest.php@Pay
|
|
*
|
|
* @author 李东云 <Dongyun.Li@LuxCreo.Ai>
|
|
* Powered by PhpStorm
|
|
* Created on 2025/8/18
|
|
*/
|
|
|
|
use Singularity\HDK\Pay\Application\Dto\Transaction\RechargeDto;
|
|
use Singularity\HDK\Pay\Infrastructure\Repository\OrderRepo;
|
|
|
|
use function Hyperf\Support\make;
|
|
|
|
it('should can create recharge order', function () {
|
|
$uid = 'cn3321';
|
|
$items = [
|
|
'product_id' => 1,
|
|
'quantity' => 2,
|
|
];
|
|
|
|
$repo = make(OrderRepo::class);
|
|
$result = $repo->recharge($uid, [$items]);
|
|
expect($result)->toBeInstanceOf(RechargeDto::class);
|
|
});
|