feat(backend): add loyalty constants and first-payment guard

Extract LoyaltyStampCost and add LoyaltyDiscountPercent constant. Add first-payment guard to ApplyLoyaltyRedemption — reject if a non-discount payment already exists on the booking.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-06-19 11:34:20 +01:00
co-authored by Sisyphus
parent df6c0dece5
commit 19996c1e08
3 changed files with 16 additions and 11 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ func ProcessCancellationRefund(
if err != nil {
log.Printf("Failed to refund loyalty stamps for booking %s: %v", bookingID, err)
} else {
log.Printf("Refunded 10 loyalty stamps to user %s after cancellation of booking %s", bookingUserID, bookingID)
log.Printf("Refunded %d loyalty stamps to user %s after cancellation of booking %s", LoyaltyStampCost, bookingUserID, bookingID)
}
}
}