Return admin-approval messages when Jibit profile or card verify is off.

Profile and bank-card save paths now succeed with clear pending-admin copy instead of a validation error when automatic Jibit checks are disabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 21:35:10 +03:30
co-authored by Cursor
parent f1fb3c1e74
commit 1b73305d6f
2 changed files with 10 additions and 3 deletions
@@ -236,8 +236,10 @@ class CustomerController extends Controller
} elseif (!$customer->is_legal && !$cfg->isRegisterJibitVerifyEnabled()) {
return response()->json([
'message' => 'اطلاعات شما با موفقیت ثبت شد. لطفاً برای تکمیل احراز هویت با پشتیبانی یا مدیر سامانه تماس بگیرید.',
], 422);
'ok' => true,
'pending_admin' => true,
'message' => 'اطلاعات کاربری شما ثبت شد و پس از تایید ادمین فعال سازی خواهد شد',
]);
}
return response()->json(true);
} catch (\Exception $e) {
@@ -91,7 +91,11 @@ class BankAccountController extends SuperController
'sts' => 2,
]);
Customer::where('id', $user->id)->update(['birth_date' => $request->birth_date ?? $user->birth_date]);
$data = ['success' => true, 'bankAccount' => $BA];
$data = [
'success' => true,
'bankAccount' => $BA,
'message' => 'کارت بانکی شما با موفقیت ثبت شد',
];
return response()->json($data);
} else {
@@ -117,6 +121,7 @@ class BankAccountController extends SuperController
}
$data = $request->only(['account_number', 'bank_name', 'cart_number', 'shaba_number', 'customer_id']);
BankAccount::create($data);
$data['message'] = 'اطلاعات کارت بانکی شما ثبت شد و پس از تایید ادمین فعال سازی خواهد شد';
return response()->json($data);
}