diff --git a/src/app/pages/cart/cart.component.ts b/src/app/pages/cart/cart.component.ts index cf00c2e..77ec385 100644 --- a/src/app/pages/cart/cart.component.ts +++ b/src/app/pages/cart/cart.component.ts @@ -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'), diff --git a/src/app/services/api.service.ts b/src/app/services/api.service.ts index 30b1b01..1a9377f 100644 --- a/src/app/services/api.service.ts +++ b/src/app/services/api.service.ts @@ -54,7 +54,12 @@ export interface CartPaymentRequest { } export interface CreateOrderRequest { - items: Array<{ productId: string; name: string; quantity: number; price: number }>; + /** + * No `price` field: the backend must price each line item from its own + * catalog by `productId`, never trust a client-supplied amount. + * See BACKEND-API-REFERENCE.md ยง12. + */ + items: Array<{ productId: string; name: string; quantity: number }>; customer: { name: string; email: string; phone: string }; payment?: { method: string; currency: string }; shipping?: { address: string; method: string; trackingNumber: string };