2 ms·
> Hard to tell without knowing more details, but that might run into the risk that people can inject made-up discounts in the browser and send them to the backe
by doix 3y ago
> Hard to tell without knowing more details, but that might run into the risk that people can inject made-up discounts in the browser and send them to the backend, which then charges less.
That was my first thought, but thinking about it more, it probably makes no difference. If it's susceptible to injected made-up discounts now, it would have been susceptible before as well. It doesn't matter if the coupon code comes from the vendor API or their own API if you're going to inject fake data anyway.