This commit is contained in:
2026-06-14 21:42:21 +03:30
parent b84b2df01a
commit 0c4cbd7c12
9 changed files with 80 additions and 23 deletions
@@ -10,6 +10,7 @@ use App\Models\Order;
use App\Models\Price;
use App\Models\Setting;
use App\Models\User;
use App\Services\ConfigService;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Rooyesh\Wallet\interfaces\TransactionInterface;
@@ -40,6 +41,7 @@ class OrderController extends Controller
if (!auth('customer')->user()->trade_active){
throw new UnprocessableEntityHttpException('امکان سفارش برای شما غیرفعال است.');
}
app(ConfigService::class)->assertTradingOpen();
$wallet = Wallet::where('owner',auth('customer')->id())->whereNull('fund_id')
->first();
$wallet_interface = new WalletInterface($data['customer_id'], 1);