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
@@ -284,6 +284,16 @@ class WalletController extends Controller
}
}
if (app(ConfigService::class)->isShayeganAccounting()) {
try {
$data['direction'] = $deposit ? 0 : 1;
$data['withdraw_id'] = $Withdraw->id;
app(\App\Http\Controllers\Admin\ShayeganController::class)->wallet($data);
} catch (\Exception $e) {
report($e);
}
}
try {
app(PargarSyncService::class)->queueWalletDocument(
$customer,
@@ -430,6 +440,16 @@ class WalletController extends Controller
}
}
if (app(ConfigService::class)->isShayeganAccounting()) {
try {
$data['direction'] = $deposit ? 1 : 0;
$data['withdraw_id'] = $Withdraw->id;
app(\App\Http\Controllers\Admin\ShayeganController::class)->walletGold($data);
} catch (\Exception $e) {
report($e);
}
}
try {
app(PargarSyncService::class)->queueWalletDocument(
$customer,
@@ -669,6 +689,17 @@ class WalletController extends Controller
}
}
if (app(ConfigService::class)->isShayeganAccounting()) {
try {
$data['direction'] = $deposit ? 1 : 0;
$data['withdraw_id'] = $Withdraw->id;
$data['product_id'] = $productId;
app(\App\Http\Controllers\Admin\ShayeganController::class)->walletGold($data);
} catch (\Exception $e) {
report($e);
}
}
try {
// فقط محصول متصل به کیف اصلی → سند طلای پرگار
app(PargarSyncService::class)->queueWalletDocument(