diff --git a/third_party/phpcommon b/third_party/phpcommon index 1e3bb4d..7ecf558 160000 --- a/third_party/phpcommon +++ b/third_party/phpcommon @@ -1 +1 @@ -Subproject commit 1e3bb4df855f6d11df75545d10b0c2aacea34a06 +Subproject commit 7ecf558df93a2656631782e76c6d35697da72808 diff --git a/webapp/controller/PayController.class.php b/webapp/controller/PayController.class.php index 769c1a0..be5ebfc 100644 --- a/webapp/controller/PayController.class.php +++ b/webapp/controller/PayController.class.php @@ -410,19 +410,21 @@ class PayController{ } $itemid = $_REQUEST['itemid']; $itemnum = $_REQUEST['itemnum']; + $itemid = 16002; $itemnum = 1; $item_meta_table = require('../res/item@item.php'); $item_meta = getItemConfig($item_meta_table, $itemid); - if ($item_meta) { - + if (!$item_meta || $item_meta['rmbprice'] < 0.001) { + phpcommon\sendError(ERR_USER_BASE + 2, '参数错误'); + die(); } $params = array( 'account_id' => $_REQUEST['account_id'], 'itemid' => $itemid, 'itemnum' => 1, - 'price' => 0.01 + 'price' => SERVER_ENV != _ONLINE ? 0.01 : (float)$item_meta['rmbprice'] ); $timestamp = time(); $params['sign'] = phpcommon\md5Sign($params, '06ba97e28ea905b0b7ed5477746b07f1', $timestamp);