This commit is contained in:
songliang 2023-06-08 13:59:50 +08:00
parent 863bcb5f00
commit e198f3d7f8

View File

@ -277,11 +277,22 @@ class ShopController extends BaseAuthedController
// } // }
// 我返回给你这些数据和一个sign字段, // 我返回给你这些数据和一个sign字段,
// sign使用上面 repdata 按key 顺序排后, 组成key1=val1&key2=val2后, 使用hmac_sha256 hash, key是 iG4Rpsa)6U31$H#^T85$^^3 // sign使用上面 repdata 按key 顺序排后, 组成key1=val1&key2=val2后, 使用hmac_sha256 hash, key是 iG4Rpsa)6U31$H#^T85$^^3
error_log("buyGoodsDirect");
$id = getReqVal('id', 0);
$token_type = getReqVal('token_type', ''); $token_type = getReqVal('token_type', '');
$goods_num = getReqVal('goods_num', 0); $goods_num = getReqVal('goods_num', 0);
$order_id = 28;
error_log("buyGoodsDirect");
$conn = myself()->_getMysql('');
$order = SqlHelper::selectOne($conn, 't_shop_buy_order', array('account_id', 'item_id', 'goods_num', 'status'), array('idx' => $order_id));
$id = $order['item_id'];
$goods_num = $order['goods_num'];
$status = $order['status'];
$row = mt\ShopGoods::get($id); $row = mt\ShopGoods::get($id);
$desired_token_type = $row['token_type']; $desired_token_type = $row['token_type'];