1
This commit is contained in:
parent
c76f5e1c5c
commit
99183cdb8b
@ -9,6 +9,15 @@ require_once ('services/callback/common/SignatureService.php');
|
|||||||
|
|
||||||
use phpcommon\SqlHelper;
|
use phpcommon\SqlHelper;
|
||||||
|
|
||||||
|
/*
|
||||||
|
const params = {
|
||||||
|
'c': 'Callback',
|
||||||
|
'a': 'dispatch',
|
||||||
|
'action': 'gameItemMallBuyOk',
|
||||||
|
'trans_id': transId,
|
||||||
|
'order_id': orderId,
|
||||||
|
};
|
||||||
|
*/
|
||||||
class GameItemMallBuyOk {
|
class GameItemMallBuyOk {
|
||||||
|
|
||||||
public function process()
|
public function process()
|
||||||
@ -16,7 +25,7 @@ class GameItemMallBuyOk {
|
|||||||
SignatureService::web3ServiceCheck();
|
SignatureService::web3ServiceCheck();
|
||||||
$address = getReqVal('address', '');
|
$address = getReqVal('address', '');
|
||||||
$orderId = getReqVal('order_id', '');
|
$orderId = getReqVal('order_id', '');
|
||||||
|
|
||||||
error_log("GameItemMallBuyOk-------------------");
|
error_log("GameItemMallBuyOk-------------------");
|
||||||
$orderDb = SqlHelper::ormSelectOne(
|
$orderDb = SqlHelper::ormSelectOne(
|
||||||
myself()->_getMysql($address),
|
myself()->_getMysql($address),
|
||||||
@ -40,15 +49,15 @@ class GameItemMallBuyOk {
|
|||||||
));
|
));
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
// 修改订单状态
|
// 修改订单状态
|
||||||
$this->_updateOrderState($address,$orderId);
|
$this->_updateOrderState($address,$orderId);
|
||||||
|
|
||||||
// 小胡 回调的处理
|
// 小胡 回调的处理
|
||||||
if ($this->_isVirtualItem($orderDb['item_id'])){
|
if ($this->_isVirtualItem($orderDb['item_id'])){
|
||||||
$passCbService = new BuyPassCbService();
|
$passCbService = new BuyPassCbService();
|
||||||
$passCbService->process($orderDb);
|
$passCbService->process($orderDb);
|
||||||
} else {
|
} else {
|
||||||
// 老宋 处理...
|
// 老宋 处理...
|
||||||
$shopGoodsCbService = new BuyShopGoodsCbService();
|
$shopGoodsCbService = new BuyShopGoodsCbService();
|
||||||
$shopGoodsCbService->process($orderDb);
|
$shopGoodsCbService->process($orderDb);
|
||||||
|
|
||||||
@ -61,25 +70,25 @@ class GameItemMallBuyOk {
|
|||||||
|
|
||||||
private function _isVirtualItem($itemId){
|
private function _isVirtualItem($itemId){
|
||||||
return in_array($itemId, array(
|
return in_array($itemId, array(
|
||||||
V_ITEM_EXP,
|
V_ITEM_EXP,
|
||||||
V_ITEM_PASS,
|
V_ITEM_PASS,
|
||||||
V_ITEM_RESET_CARD,
|
V_ITEM_RESET_CARD,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _updateOrderState($address,$transId){
|
private function _updateOrderState($address,$transId){
|
||||||
SqlHelper::update
|
SqlHelper::update
|
||||||
(myself()->_getMysql($address),
|
(myself()->_getMysql($address),
|
||||||
't_bc_order',
|
't_bc_order',
|
||||||
array(
|
array(
|
||||||
'order_id' => $transId
|
'order_id' => $transId
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
'modifytime' => myself()->_getNowTime(),
|
'modifytime' => myself()->_getNowTime(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user