fix convert number to string for payments
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import { YooCheckout, ICreatePayment } from '@a2seven/yoo-checkout';
|
||||
import { getSessionData, deleteSession } from '@/app/actions/session';
|
||||
import { API_BASE_URL } from '@/app/actions/definitions';
|
||||
import { id } from 'zod/v4/locales';
|
||||
|
||||
const checkout = new YooCheckout({ shopId: '1276731', secretKey: 'test_0Yns_0NHV5GJf6ypJ5HC4NSfnLO8SJkw-1PwrVWsDl4' });
|
||||
|
||||
@@ -48,7 +47,7 @@ export async function yooKasaCreatePayment(amount: number, tariff: number, opera
|
||||
|
||||
const createPayload: ICreatePayment = {
|
||||
amount: {
|
||||
value: amount.toLocaleString().replace(/\s/g, ''),
|
||||
value: amount.toLocaleString().replace(/[,\s.]/g, ''),
|
||||
currency: 'RUB'
|
||||
},
|
||||
confirmation: {
|
||||
|
||||
Reference in New Issue
Block a user