This commit is contained in:
aozhiwei 2024-09-25 14:20:28 +08:00
parent b3e81eb8bf
commit 020b0e92bb
2 changed files with 48 additions and 2 deletions

View File

@ -50,5 +50,51 @@ class Shop(object):
['!items', [0], '宝箱物品列表'], ['!items', [0], '宝箱物品列表'],
['free_num', 0, '免费次数'], ['free_num', 0, '免费次数'],
] ]
} },
{
'name': 'queryInAppBalance',
'desc': '查询当天内购限制余额',
'group': 'Shop',
'url': 'webapp/index.php?c=Shop&a=queryInAppBalance',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['balance', '', '美元'],
]
},
{
'name': 'inappPurchase',
'desc': '发起一个内购(购买钻石)',
'group': 'Shop',
'url': 'webapp/index.php?c=Shop&a=inappPurchase',
'params': [
_common.ReqHead(),
['goods_id', '', '商品唯一id'],
['goods_num', 0, '商品数量'],
['platform', 0, '平台 1android 2ios'],
],
'response': [
_common.RspHead(),
['order_id', '', '订单id'],
]
},
{
'name': 'queryInAppPurchase',
'desc': '查询内购(购买钻石)状态',
'group': 'Shop',
'url': 'webapp/index.php?c=Shop&a=queryInAppPurchase',
'params': [
_common.ReqHead(),
['order_id', '', '订单id'],
],
'response': [
_common.RspHead(),
['order_id', '', '订单id'],
['item_id', '', '商品id'],
['item_num', 0, '商品数量'],
['status', 0, '订单状态 0:未支付 1:已支付 2:支付失败'],
]
},
] ]

View File

@ -197,7 +197,7 @@ class ShopController extends BaseAuthedController {
} }
public function inappPurchase() public function inappPurchase()
{ {
$goodsId = getReqVal('goods_id', 0); $goodsId = getReqVal('goods_id', 0);
$goodsNum = getReqVal('goods_num', 0); $goodsNum = getReqVal('goods_num', 0);