mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 05:35:08 +08:00
feat(invoice): 添加发票金额和货币支持
- 在 CreateInvoiceCmd 中新增 price 和 currencySymbol 字段 - 在 Invoice 聚合根中集成 Money 对象并添加相关方法 - 更新 InvoiceRepo 以处理价格数据的序列化与反序列化 - 在测试中增加对新字段的验证
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* Created on 2025/8/29
|
||||
*/
|
||||
|
||||
use Money\Money;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Singularity\HDK\Pay\Application\Command\CreateInvoiceCmd;
|
||||
use Singularity\HDK\Pay\Domain\Invoice\Aggregate\Invoice\Invoice;
|
||||
@@ -29,6 +30,8 @@ it('should can create invoice', function () {
|
||||
state: "Illinois",
|
||||
country: "United States",
|
||||
zipCode: "67890-1234",
|
||||
price: Money::EUR('19900'),
|
||||
currencySymbol: '€'
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user