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