fix: stop sending client-computed price on order creation
createOrder() sent a discount-applied price per line item that the client computed itself, with no server revalidation. Items now only carry productId/name/quantity - the backend must price from its own catalog. createPayment()'s amount (required to actually charge the payment gateway) is unchanged; backend must revalidate it instead, tracked in BACKEND-API-REFERENCE.md §12. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -424,7 +424,6 @@ export class CartComponent implements OnDestroy {
|
||||
productId: String(item.itemID),
|
||||
name: item.name,
|
||||
quantity: item.quantity,
|
||||
price: item.discount > 0 ? item.price * (1 - item.discount / 100) : item.price,
|
||||
})),
|
||||
customer: {
|
||||
name: this.getTelegramUsername() || this.i18n.t('common.guest'),
|
||||
|
||||
Reference in New Issue
Block a user