add error handler for payment request
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "no-copy-frontend",
|
"name": "no-copy-frontend",
|
||||||
"version": "0.76.0",
|
"version": "0.77.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 2999",
|
"dev": "next dev -p 2999",
|
||||||
|
|||||||
@@ -378,6 +378,10 @@ export async function createPayoutRequest(
|
|||||||
throw JSON.parse(responseText)?.message;
|
throw JSON.parse(responseText)?.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (response.status === 409) {
|
||||||
|
throw 'insufficient-funds-to-receive-payment'
|
||||||
|
}
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const parsed = await response.json();
|
const parsed = await response.json();
|
||||||
console.log(parsed);
|
console.log(parsed);
|
||||||
@@ -403,6 +407,9 @@ export async function createPayoutRequest(
|
|||||||
case 'Min sum for pay 1000':
|
case 'Min sum for pay 1000':
|
||||||
typedError = 'min-sum-for-payout-1000';
|
typedError = 'min-sum-for-payout-1000';
|
||||||
break;
|
break;
|
||||||
|
case 'insufficient-funds-to-receive-payment':
|
||||||
|
typedError = 'insufficient-funds-to-receive-payment';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
typedError = 'payment-error';
|
typedError = 'payment-error';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -550,7 +550,7 @@ export default function VerificationUploadSection({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{
|
{/* {
|
||||||
(fileType === 'image' && file.preview) && (
|
(fileType === 'image' && file.preview) && (
|
||||||
<div
|
<div
|
||||||
className="image-preview-wrapper"
|
className="image-preview-wrapper"
|
||||||
@@ -565,7 +565,7 @@ export default function VerificationUploadSection({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
} */}
|
||||||
|
|
||||||
{
|
{
|
||||||
file.status === 'pending' && (
|
file.status === 'pending' && (
|
||||||
|
|||||||
@@ -389,7 +389,8 @@
|
|||||||
"deselect": "Deselect",
|
"deselect": "Deselect",
|
||||||
"select-all": "Select all",
|
"select-all": "Select all",
|
||||||
"text-area-error-fill-complaint-text": "Fill out the complaint text",
|
"text-area-error-fill-complaint-text": "Fill out the complaint text",
|
||||||
"to-view-a-file-match-click-on-the-card-from-the-list": "To view a file match, click on the card from the list"
|
"to-view-a-file-match-click-on-the-card-from-the-list": "To view a file match, click on the card from the list",
|
||||||
|
"insufficient-funds-to-receive-payment": "Insufficient funds to receive payment"
|
||||||
},
|
},
|
||||||
"Login-register-form": {
|
"Login-register-form": {
|
||||||
"and": "and",
|
"and": "and",
|
||||||
|
|||||||
@@ -389,7 +389,8 @@
|
|||||||
"deselect": "Снять выделение",
|
"deselect": "Снять выделение",
|
||||||
"select-all": "Выбрать все",
|
"select-all": "Выбрать все",
|
||||||
"text-area-error-fill-complaint-text": "Заполните текст жалобы",
|
"text-area-error-fill-complaint-text": "Заполните текст жалобы",
|
||||||
"to-view-a-file-match-click-on-the-card-from-the-list": "Для просмотра совпадения по файлу нажмите на карточку из списка"
|
"to-view-a-file-match-click-on-the-card-from-the-list": "Для просмотра совпадения по файлу нажмите на карточку из списка",
|
||||||
|
"insufficient-funds-to-receive-payment": "Недостаточно средств получения выплаты"
|
||||||
},
|
},
|
||||||
"Login-register-form": {
|
"Login-register-form": {
|
||||||
"and": "и",
|
"and": "и",
|
||||||
|
|||||||
Reference in New Issue
Block a user