This commit is contained in:
aozhiwei 2023-08-02 17:03:52 +08:00
parent da269b0637
commit a5283e79ef
2 changed files with 13 additions and 1 deletions

View File

@ -43,6 +43,7 @@ class Shop(object):
'url': 'webapp/index.php?c=Shop&a=outappPurchase',
'params': [
_common.ReqHead(),
['platform', 0, '平台 1android 2ios'],
['goods_id', '', '商品唯一id'],
['goods_num', 0, '商品数量'],
['network', '', '渠道那边定义的id'],

View File

@ -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,