handled some bugs and adde some feature for banner

This commit is contained in:
2026-07-19 15:53:05 +03:30
parent fc9de5198c
commit 160d6bd923
10 changed files with 158 additions and 36 deletions
@@ -11,6 +11,7 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use Rooyesh\Wallet\interfaces\TransactionInterface;
use Rooyesh\Wallet\interfaces\WalletInterface;
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
class paypingController extends Controller
{
@@ -80,6 +81,16 @@ class paypingController extends Controller
$finalPriseP = (int) (ceil($finalPriseP / 10) * 10);
}
// شارژ کیف (بدون سفارش): حداقل واریز از تنظیمات
if (!isset($request->order_id)) {
$minDeposit = $this->cfg()->getInt('min_deposit', 0);
if ($minDeposit > 0 && (int) $finalPriseP < $minDeposit) {
throw new UnprocessableEntityHttpException(
'حداقل مقدار واریز ' . number_format($minDeposit) . ' ریال است'
);
}
}
$Withdraw = Withdraw::create([
'customer_id' => auth('customer')->id(),
'cash' => $finalPriseP,