Commit d742048c1b336e01ba8a8833a32327e6fe1fbe3a

Authored by saicom
1 parent cd90db08

ios充值前面改为东银河

Showing 1 changed file with 14 additions and 1 deletions   Show diff stats
src/actions/StoreAction.lua
@@ -52,6 +52,19 @@ local function signPms(params, secret_key) @@ -52,6 +52,19 @@ local function signPms(params, secret_key)
52 return md5.sumhexa(urlCode .. secret_key):lower() 52 return md5.sumhexa(urlCode .. secret_key):lower()
53 end 53 end
54 54
  55 +local function signDyhPms(params, secret_key)
  56 + local keys = table_keys(params)
  57 + table.sort(keys)
  58 + local str2Sign = ""
  59 + for index, key in ipairs(keys) do
  60 + if str2Sign ~= "" then
  61 + str2Sign = str2Sign .. '&'
  62 + end
  63 + str2Sign = str2Sign .. string.format("%s=%s", key, params[key])
  64 + end
  65 + return md5.sumhexa(str2Sign .. secret_key):lower()
  66 +end
  67 +
55 -- bili android 充值 入口 68 -- bili android 充值 入口
56 function _M.biliAndroidRechargeRpc(agent, data) 69 function _M.biliAndroidRechargeRpc(agent, data)
57 local role = agent.role 70 local role = agent.role
@@ -226,7 +239,7 @@ function _M.iosRechargeRpc(agent, data) @@ -226,7 +239,7 @@ function _M.iosRechargeRpc(agent, data)
226 --创建订单号 239 --创建订单号
227 local partnerOrderId = role:getPurchaseOrder(id,nil,choose) 240 local partnerOrderId = role:getPurchaseOrder(id,nil,choose)
228 -- 签名 241 -- 签名
229 - local secret_key = "1916d62251dd4a8aa5e452121eefc9a1" 242 + local secret_key = "2b2036e1f44640a59168c92462714870"
230 local need = { 243 local need = {
231 out_trade_no = partnerOrderId, 244 out_trade_no = partnerOrderId,
232 money = dataSet.rmb * 100, 245 money = dataSet.rmb * 100,