1
This commit is contained in:
parent
da269b0637
commit
a5283e79ef
@ -43,6 +43,7 @@ class Shop(object):
|
||||
'url': 'webapp/index.php?c=Shop&a=outappPurchase',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['platform', 0, '平台 1:android 2:ios'],
|
||||
['goods_id', '', '商品唯一id'],
|
||||
['goods_num', 0, '商品数量'],
|
||||
['network', '', '渠道那边定义的id'],
|
||||
|
@ -160,6 +160,7 @@ class ShopController extends BaseAuthedController {
|
||||
$goodsId = getReqVal('goods_id', 0);
|
||||
$goodsNum = getReqVal('goods_num', 1);
|
||||
|
||||
$platform = getReqVal('platform', '');
|
||||
$network = getReqVal('network', '');
|
||||
$crypto = getReqVal('crypto', '');
|
||||
$fiat = getReqVal('fiat', '');
|
||||
@ -172,6 +173,14 @@ class ShopController extends BaseAuthedController {
|
||||
$this->_rspErr(1, 'address is empty');
|
||||
return;
|
||||
}
|
||||
if (!in_array($platform,
|
||||
array(
|
||||
1,
|
||||
2
|
||||
))) {
|
||||
$this->_rspErr(1, 'paramater error platform');
|
||||
return;
|
||||
}
|
||||
if ($goodsNum != 1) {
|
||||
$this->_rspErr(1, 'goods_num is invalid');
|
||||
return;
|
||||
@ -229,7 +238,9 @@ class ShopController extends BaseAuthedController {
|
||||
$nowTime,
|
||||
$slat
|
||||
);
|
||||
$platform = 1;
|
||||
foreach ($params as &$value) {
|
||||
$value = '' . $value;
|
||||
}
|
||||
OutAppOrder::add(
|
||||
$orderId,
|
||||
$platform,
|
||||
|
Loading…
x
Reference in New Issue
Block a user