added banning for when amount is under 0
This commit is contained in:
@@ -421,6 +421,7 @@ class CartController extends Controller
|
||||
}
|
||||
|
||||
app(ConfigService::class)->assertProductTradingOpen($product);
|
||||
app(ConfigService::class)->assertMainGoldZeroBeforeOtherProductBuy($wallet_interface->wallet, $product);
|
||||
|
||||
$qty = (int) $item->quantity;
|
||||
|
||||
|
||||
@@ -118,6 +118,8 @@ class SingleOrderController extends Controller
|
||||
// Check if the user wants to buy
|
||||
if ($data['direction'] == 1) {
|
||||
|
||||
$config->assertMainGoldZeroBeforeOtherProductBuy($wallet, $data['product']);
|
||||
|
||||
$data['service_charge_percentage'] = isset($data['fee_free']) && $data['fee_free'] === true ? 0 : ($data['product']['percent_fee_buy']) * $data['number'];
|
||||
$data['price_original'] = $this->resolveProductUnitBasePrice($data['product']);
|
||||
$this->applyCashPriceDiff($config, $data['product'], 1, $data, (float) $data['price_original']);
|
||||
|
||||
Reference in New Issue
Block a user