Cart Integrity
Business logic validation
BUSINESS LOGIC VALIDATION
Client-submitted totals are untrusted. Servers should recalculate prices from authoritative product data before payment.
LEARNING GOAL
Identify the failure from the supplied synthetic evidence and explain a defensive fix.
EVIDENCE
catalog: item-7 unitPrice=30 quantity=2
POST /checkout {"item":"item-7","quantity":2,"clientTotal":1}
expectedTotal=60
review_marker=server_sets_totalsHINT
The client claims 1, but catalog price times quantity is 60.
KNOWLEDGE CHECK
Which value must the server recalculate?
The client claims 1, but catalog price times quantity is 60.
Submit the review marker in SG{marker} format.
Progress stays in this browser.
DEFENSIVE TAKEAWAY
Calculate totals on the server and validate inventory, discounts and currency units.