Commit 8a9139fa3b85716aadf2ea48dcd6e740cbad6bb7

Authored by zhangqijia
2 parents 993bb525 a8a9adb2

Merge remote-tracking branch 'origin/cn/develop' into cn/develop

src/ProtocolCode.lua
... ... @@ -13,6 +13,8 @@ actionCodes = {
13 13 Gm_clientRequest = 20,
14 14 Gm_receiveResponse = 21,
15 15 Gm_helpRpc = 22,
  16 + Gm_clientLuaCommandNtf = 23,
  17 + Gm_clientUploadLuaResult = 24,
16 18  
17 19 Role_notifyNewEvent = 100,
18 20 Role_queryLoginRpc = 101,
... ... @@ -227,6 +229,7 @@ actionCodes = {
227 229 Store_getExploreCommandRewardRpc = 563, --探索指令
228 230 Store_getTotalRechargeAwardRpc = 564, -- 累计充值
229 231 Store_monthCardRewardRpc = 565, --每日月卡+特刊奖励
  232 + Store_dyhxAndroidRechargeRpc = 566, -- 东银河充值
230 233  
231 234 Store_biliCloudRechargeRpc = 596,
232 235 Store_biliAndroidRechargeRpc = 597,
... ...
src/actions/GmAction.lua
... ... @@ -675,6 +675,13 @@ function _M.helpRpc(agent, data)
675 675 return true
676 676 end
677 677  
  678 +function _M.clientUploadLuaResult(agent, data)
  679 + local role = agent.role
  680 + local msg = MsgPack.unpack(data)
  681 + role:mylog("gm_action", {desc = "upload_lua", int1 = id, key1 = msg.result})
  682 + return true
  683 +end
  684 +
678 685 function _M.test(role, pms)
679 686 local id = tonum(pms.pm1, 0)
680 687 local actid = nil
... ... @@ -1086,4 +1093,10 @@ function _M.reset_capsule(role, pms, capsule_serv)
1086 1093 return "成功"
1087 1094 end
1088 1095  
  1096 +function _M.do_lua(role, pms)
  1097 + local luaStr = pms.pm1
  1098 + SendPacket(actionCodes.Gm_clientLuaCommandNtf, MsgPack.pack({lua = luaStr}))
  1099 + return "成功"
  1100 +end
  1101 +
1089 1102 return _M
1090 1103 \ No newline at end of file
... ...
src/actions/StoreAction.lua
... ... @@ -253,6 +253,34 @@ function _M.iosRechargeRpc(agent, data)
253 253 return true
254 254 end
255 255  
  256 +-- dyh android 充值 入口
  257 +function _M.dyhxAndroidRechargeRpc(agent, data)
  258 + local role = agent.role
  259 + local msg = MsgPack.unpack(data)
  260 + local id = msg.id
  261 + local choose = msg.choose or ""
  262 + local dataSet = csvdb["shop_rechargeCsv"][id]
  263 + if not dataSet then return end
  264 + local roleId = role:getProperty("id")
  265 +
  266 + role.ignoreHeartbeat = true
  267 + --创建订单号
  268 + local partnerOrderId = role:getPurchaseOrder(id,nil,choose)
  269 + -- 签名
  270 + local secret_key = "51ba4398c69d4d229d5402295dc38b50"
  271 + local need = {
  272 + out_trade_no = partnerOrderId,
  273 + money = dataSet.rmb * 100,
  274 + game_money = dataSet.diamond,
  275 + notify_url = msg.notifyUrl
  276 + }
  277 + local sign = signDyhPms(need, secret_key)
  278 +
  279 + SendPacket(actionCodes.Store_dyhxAndroidRechargeRpc, MsgPack.pack({ order = partnerOrderId, sign = sign}))
  280 + return true
  281 +end
  282 +
  283 +
256 284 function _M.purchaseOrderResult(agent, data)
257 285 local role = agent.role
258 286  
... ...