feat(accounting): add Shayegan as fixed boursecu provider

Wire outbound Invoice/Document sync after confirmed ops, store sync status with timeout lock, and keep SQL credentials out of frontend responses.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-05 17:12:43 +03:30
co-authored by Cursor
parent 698fbed805
commit a42261c06e
20 changed files with 1485 additions and 18 deletions
@@ -445,6 +445,14 @@ class CartController extends Controller
report($e);
}
}
if ($config->isShayeganAccounting()) {
try {
app(\App\Http\Controllers\Admin\ShayeganController::class)->storeTrade($payload);
} catch (\Throwable $e) {
report($e);
}
}
}
if ($config->isPargarAccounting()) {
@@ -486,6 +486,20 @@ class WalletController extends Controller
}
}
if (app(ConfigService::class)->isShayeganAccounting()) {
try {
app(\App\Http\Controllers\Admin\ShayeganController::class)->wallet([
'customer_id' => auth('customer')->id(),
'value' => $amount,
'direction' => 1,
'withdraw_id' => $Withdraw->id,
'note' => 'برداشت ریالی',
]);
} catch (\Exception $e) {
report($e);
}
}
$companyName = $this->Config('name_fa'); // Company name from configuration
$message = "کاربر $userName با شماره موبایل $userMobile درخواست برداشت مبلغ " . number_format($withdrawAmount) . " ریال را دارد. با تشکر، $companyName";
User::where('send_sms', 1)->get()->each(function ($admin) use ($message) {