1
This commit is contained in:
parent
ebf0efc987
commit
48ffcea204
@ -120,28 +120,20 @@ class MallController extends BaseAuthedController {
|
||||
return;
|
||||
}
|
||||
$itemId = getReqVal('item_id', '');
|
||||
$amount = getReqVal('amount', '');
|
||||
$amount = intval(getReqVal('amount', ''), 10);
|
||||
$currency = getReqVal('currency', '');
|
||||
$priceBn = phpcommon\bnInit(getReqVal('price', ''));
|
||||
if ($itemId != V_ITEM_GOLD) {
|
||||
$this->_rspErr(1, 'only support gold');
|
||||
return;
|
||||
}
|
||||
if (!$this->checkPrice($priceBn)) {
|
||||
return;
|
||||
}
|
||||
if (empty($amount)) {
|
||||
$this->_rspErr(1, 'amount not found');
|
||||
return;
|
||||
}
|
||||
if (!is_numeric($amount)) {
|
||||
$this->_rspErr(1, 'amount must be number');
|
||||
return;
|
||||
}
|
||||
if ($amount <= 0) {
|
||||
$this->_rspErr(1, 'amount must > 0');
|
||||
return;
|
||||
}
|
||||
if (!$this->checkPrice($priceBn)) {
|
||||
return;
|
||||
}
|
||||
if (!in_array(
|
||||
$currency,
|
||||
array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user