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