diff --git a/doc/Shop.py b/doc/Shop.py index 060283a8..dce3005d 100644 --- a/doc/Shop.py +++ b/doc/Shop.py @@ -50,5 +50,51 @@ class Shop(object): ['!items', [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, '平台 1:android 2:ios'], + ], + '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:支付失败'], + ] + }, ] diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 6cc46eb8..14bb9908 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -197,7 +197,7 @@ class ShopController extends BaseAuthedController { } -public function inappPurchase() + public function inappPurchase() { $goodsId = getReqVal('goods_id', 0); $goodsNum = getReqVal('goods_num', 0);