fix(purchase): correct gift amount deduction logic and enhance payment processing comments

This commit is contained in:
Chang lue Tsen
2025-07-07 14:26:53 -04:00
parent 76816ca8ea
commit 9691257bad
7 changed files with 1206 additions and 141 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ func (l *PurchaseLogic) Purchase(req *types.PurchaseOrderRequest) (resp *types.P
if u.GiftAmount >= amount {
deductionAmount = amount
amount = 0
u.GiftAmount -= amount
u.GiftAmount -= deductionAmount
} else {
deductionAmount = u.GiftAmount
amount -= u.GiftAmount