nxtgauge-backend-rust/apps/payments
Tracewebstudio Dev 4e0e6af3e1
All checks were successful
build-and-release / build (employees) (push) Successful in 11s
build-and-release / build (cron) (push) Successful in 14s
build-and-release / build (customers) (push) Successful in 16s
build-and-release / build (catering-services) (push) Successful in 19s
build-and-release / build (companies) (push) Successful in 21s
build-and-release / build (developers) (push) Successful in 20s
build-and-release / build (fitness-trainers) (push) Successful in 7s
build-and-release / build (gateway) (push) Successful in 9s
build-and-release / build (graphic-designers) (push) Successful in 8s
build-and-release / build (job-seekers) (push) Successful in 8s
build-and-release / build (jobs) (push) Successful in 10s
build-and-release / build (social-media-managers) (push) Successful in 8s
build-and-release / build (makeup-artists) (push) Successful in 12s
build-and-release / build (photographers) (push) Successful in 8s
build-and-release / build (tutors) (push) Successful in 7s
build-and-release / build (users) (push) Successful in 6s
backend-integration-tests / ai-credits (push) Successful in 9s
build-and-release / build (ugc-content-creators) (push) Successful in 11s
build-and-release / build (video-editors) (push) Successful in 11s
build-and-release / build (payments) (push) Successful in 1m0s
fix(payments): compare global coupon redemptions against max_redemptions not max_redemptions_per_user
validate_coupon was checking:
  total_redemptions (= redemptions_used, global count) >= max_per_user (per-user limit)

which means a coupon with max_redemptions=1000 and max_redemptions_per_user=1
would be marked exhausted after the first person ever used it.

Fix: also SELECT max_redemptions and compare global count against it.
The per-user check on line 192 (user_redemptions >= max_per_user) was
already correct and is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-14 11:19:00 +02:00
..
src fix(payments): compare global coupon redemptions against max_redemptions not max_redemptions_per_user 2026-08-14 11:19:00 +02:00
Cargo.toml feat: generate a GST invoice automatically after a successful Tracecoin/PayU purchase 2026-07-21 03:02:47 +05:30
Dockerfile fix: Update Dockerfiles to use ci.nxtgauge.com registry 2026-07-08 03:37:18 +05:30