handled some bugs and adde some feature for banner
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user