fix(montzar): persist local order before provider cover and record success or failure

Create the Elif order first (pending colleague), then submit to Liman so failed quote or wallet attempts stay visible instead of leaving orphan provider trades.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-31 22:14:36 +03:30
co-authored by Cursor
parent f6118689e1
commit d12b38a1e8
2 changed files with 164 additions and 82 deletions
+5 -1
View File
@@ -37,6 +37,9 @@ class Order extends Model
'type',//نوع مشتری
'pay_at',//تاریخ انجام معامله در پنل ادمین
'price_id',//
'provider_id',
'total_price_montzar',
'description',
];
protected $casts = [
@@ -46,7 +49,8 @@ class Order extends Model
static $STS = [
1 => 'باز',
2 => 'موفق',
3 => 'ناموفق'
3 => 'ناموفق',
4 => 'در انتظار همکار',
];
static $DIRECTION = [
1 => 'خرید',