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