mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 05:35:08 +08:00
refactor(transaction): 修改交易项中的价格字段名称
- 将 Item 类中的 'price' 字段重命名为 'unit_price' - 更新 CallbackDomainSvc 中的回调函数,使用新的 'unit_price' 字段
This commit is contained in:
@@ -23,7 +23,7 @@ final class Item extends ArrayObject
|
||||
parent::__construct([
|
||||
'name' => $name,
|
||||
'quantity' => $quantity,
|
||||
'price' => $price,
|
||||
'unit_price' => $price,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ final class CallbackDomainSvc
|
||||
callback: fn(array $item) => new Item(
|
||||
name: $item['name'],
|
||||
quantity: $item['quantity'],
|
||||
price: $item['price'],
|
||||
price: $item['unit_price'],
|
||||
),
|
||||
array: $order['items'],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user