add error handler for payment request
This commit is contained in:
@@ -378,6 +378,10 @@ export async function createPayoutRequest(
|
||||
throw JSON.parse(responseText)?.message;
|
||||
}
|
||||
|
||||
if (response.status === 409) {
|
||||
throw 'insufficient-funds-to-receive-payment'
|
||||
}
|
||||
|
||||
if (response.ok) {
|
||||
const parsed = await response.json();
|
||||
console.log(parsed);
|
||||
@@ -403,6 +407,9 @@ export async function createPayoutRequest(
|
||||
case 'Min sum for pay 1000':
|
||||
typedError = 'min-sum-for-payout-1000';
|
||||
break;
|
||||
case 'insufficient-funds-to-receive-payment':
|
||||
typedError = 'insufficient-funds-to-receive-payment';
|
||||
break;
|
||||
default:
|
||||
typedError = 'payment-error';
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ export default function VerificationUploadSection({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{
|
||||
{/* {
|
||||
(fileType === 'image' && file.preview) && (
|
||||
<div
|
||||
className="image-preview-wrapper"
|
||||
@@ -565,7 +565,7 @@ export default function VerificationUploadSection({
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
} */}
|
||||
|
||||
{
|
||||
file.status === 'pending' && (
|
||||
|
||||
@@ -16,12 +16,12 @@ export default function SettingUserVerification() {
|
||||
Верификация юзера
|
||||
</h3>
|
||||
<form>
|
||||
{/* <VerificationUploadSection
|
||||
{/* <VerificationUploadSection
|
||||
fileType="image"
|
||||
allowedExtensions={allFilesExtensions.images}
|
||||
maxFileSize={allFilesExtensions.maxFileSize}
|
||||
/> */}
|
||||
{/* <button type="submit" className="btn btn-primary">
|
||||
{/* <button type="submit" className="btn btn-primary">
|
||||
загрузить
|
||||
</button> */}
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user