--
This commit is contained in:
parent
6ab53ee318
commit
72ebc7b24b
@ -40,7 +40,7 @@ const paymentMethods: PaymentMethod[] = [
|
||||
{ label: "Тинькофф", name: "tinkoffBank", image: tinkoffLogo },
|
||||
{ label: "СБП", name: "sbp", image: spbLogo },
|
||||
{ label: "SberPay", name: "sberbank", image: sberpayLogo },
|
||||
{ label: "B2B Сбербанк", name: "b2bSperbank", image: b2bLogo },
|
||||
{ label: "B2B Сбербанк", name: "b2bSberbank", image: b2bLogo },
|
||||
{ label: "ЮMoney", name: "yoomoney", image: umoneyLogo },
|
||||
];
|
||||
|
||||
@ -90,6 +90,7 @@ export default function Payment() {
|
||||
}
|
||||
|
||||
if (Number(paymentValueField) === 0) {
|
||||
enqueueSnackbar("Введите сумму")
|
||||
return;
|
||||
}
|
||||
|
||||
@ -98,7 +99,7 @@ export default function Payment() {
|
||||
fromSquiz,
|
||||
body: {
|
||||
type: selectedPaymentMethod,
|
||||
amount: Number(paymentValueField),
|
||||
amount: Number(paymentValueField) * 100,
|
||||
currency: "RUB",
|
||||
bankCard: {
|
||||
number: "RUB",
|
||||
@ -148,6 +149,31 @@ export default function Payment() {
|
||||
}
|
||||
|
||||
return;
|
||||
} else {
|
||||
if (verificationStatus !== VerificationStatus.VERIFICATED) {
|
||||
setWarnModalOpen(true);
|
||||
|
||||
return;
|
||||
}
|
||||
console.log(paymentValueField)
|
||||
if (Number(paymentValueField) < 900){
|
||||
enqueueSnackbar("Минимальная сумма 900р")
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const sendRSPaymentError = await sendRSPayment(Number(paymentValueField));
|
||||
|
||||
if (sendRSPaymentError) {
|
||||
return enqueueSnackbar(sendRSPaymentError);
|
||||
}
|
||||
|
||||
enqueueSnackbar(
|
||||
"Cпасибо за заявку, в течении 24 часов вам будет выставлен счёт для оплаты услуг."
|
||||
);
|
||||
|
||||
navigate("/settings");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -208,7 +234,7 @@ export default function Payment() {
|
||||
>
|
||||
{paymentMethods.map(({ name, label, image, unpopular = false }) => (
|
||||
<PaymentMethodCard
|
||||
isSelected={false}
|
||||
isSelected={selectedPaymentMethod === name}
|
||||
key={name}
|
||||
label={label}
|
||||
image={image}
|
||||
@ -219,7 +245,7 @@ export default function Payment() {
|
||||
/>
|
||||
))}
|
||||
<PaymentMethodCard
|
||||
isSelected={false}
|
||||
isSelected={selectedPaymentMethod === "rspay"}
|
||||
label={"Расчётный счёт"}
|
||||
image={rsPayLogo}
|
||||
onClick={async() => {
|
||||
|
Loading…
Reference in New Issue
Block a user