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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user