1
This commit is contained in:
parent
fe0af01908
commit
f1849874c5
@ -408,13 +408,19 @@ class PayController{
|
|||||||
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
|
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$itemid = $_REQUEST['itemid'];
|
$itemid = $_REQUEST['itemid'];
|
||||||
$itemnum = $_REQUEST['itemnum'];
|
$itemnum = $_REQUEST['itemnum'];
|
||||||
|
$itemnum = 1;
|
||||||
|
|
||||||
|
$item_meta_table = require('../res/item@item.php');
|
||||||
|
$item_meta = getItemConfig($item_meta_table, $itemid);
|
||||||
|
if ($item_meta) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$params = array(
|
$params = array(
|
||||||
'account_id' => $_REQUEST['account_id'],
|
'account_id' => $_REQUEST['account_id'],
|
||||||
'itemid' => 1,
|
'itemid' => $itemid,
|
||||||
'itemnum' => 1,
|
'itemnum' => 1,
|
||||||
'price' => 0.01
|
'price' => 0.01
|
||||||
);
|
);
|
||||||
@ -430,5 +436,46 @@ class PayController{
|
|||||||
'data' => $str_encoded
|
'data' => $str_encoded
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getOrderInfo()
|
||||||
|
{
|
||||||
|
if (!loginVerify($_REQUEST['account_id'],
|
||||||
|
$_REQUEST['session_id'])) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$conn = $this->getMysql($_REQUEST['account_id']);
|
||||||
|
$row = $conn->execQueryOne('SELECT orderid, status FROM orderinfo WHERE orderid=:orderid;',
|
||||||
|
array(
|
||||||
|
':orderid' => $_REQUEST['orderid']
|
||||||
|
));
|
||||||
|
if (!$row || $row['status'] == 0) {
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => 0,
|
||||||
|
'errmsg'=> '',
|
||||||
|
'order_state' => 1,
|
||||||
|
));
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => 0,
|
||||||
|
'errmsg'=> '',
|
||||||
|
'order_state' => 0,
|
||||||
|
'buy_itemid' => 0,
|
||||||
|
'buy_itemnum' => 0,
|
||||||
|
'item_list' => array(
|
||||||
|
array(
|
||||||
|
'itemid' => 10001,
|
||||||
|
'itemnum' => 1000,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'itemid' => 10003,
|
||||||
|
'itemnum' => 1000,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user