From 4ef5ea2f58104675182b8c9de1728b444198c410 Mon Sep 17 00:00:00 2001 From: sdarbinyan Date: Thu, 13 Aug 2026 07:39:35 +0400 Subject: [PATCH] fix: cart payment/order currency ignored the selected currency createPayment() and recordOrder() hardcoded currency: 'RUB' regardless of LanguageService.currentCurrency() (app supports RUB/USD/EUR/AMD). Widened CartPaymentRequest.currency from a 'RUB' literal to string and use the actual selected currency in both calls. Co-Authored-By: Claude Sonnet 5 --- src/app/pages/cart/cart.component.ts | 4 ++-- src/app/services/api.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/pages/cart/cart.component.ts b/src/app/pages/cart/cart.component.ts index a5cb02d..35ae9d2 100644 --- a/src/app/pages/cart/cart.component.ts +++ b/src/app/pages/cart/cart.component.ts @@ -256,7 +256,7 @@ export class CartComponent implements OnDestroy { const orderId = this.generateOrderId(); const paymentPayload = { amount: Number(this.totalWithDelivery()), - currency: 'RUB' as const, + currency: this.langService.currentCurrency(), siteuserID: this.getPaymentUserId(), siteorderID: orderId, redirectUrl: '', @@ -434,7 +434,7 @@ export class CartComponent implements OnDestroy { }, payment: { method: this.selectedPaymentMethod(), - currency: 'RUB', + currency: this.langService.currentCurrency(), }, }).subscribe({ error: (err) => console.error('Error recording order:', err), diff --git a/src/app/services/api.service.ts b/src/app/services/api.service.ts index 1a9377f..d75efed 100644 --- a/src/app/services/api.service.ts +++ b/src/app/services/api.service.ts @@ -42,7 +42,7 @@ export interface QrCreateResponse { export interface CartPaymentRequest { amount: number; - currency: 'RUB'; + currency: string; siteuserID: string; siteorderID: string; redirectUrl: string;