sdk支付相关修改

tcx_xiyou_zeroOne_dev
wangzhenxing 2024-07-31 16:57:00 +08:00
parent 94ec9ce5e0
commit 5ee4c21671
2 changed files with 21 additions and 1 deletions

View File

@ -32,6 +32,26 @@ function this.GetMoney(_rmbp)
return m*ZHE_KOU
end
-- 获取相应的金额
function this.GetMoneyNoZheKou(_rmbp)
local rmbp = tonumber(_rmbp)
if rmbp <= 0 then
return rmbp
end
if not this.RMB2O[rmbp] then
LogError("表 ExchangeRate 错误: 不包含档位:"..tostring(rmbp))
return 0
end
local m = this.RMB2O[rmbp]["Price_"..this.MT]
if not m then
LogError("表 ExchangeRate 错误: 档位:"..tostring(rmbp).." , 未找到对应的货币类型 "..this.MT)
return 0
end
return m
end
function this.GetCurMoneyType()
return this.MT
end

View File

@ -169,7 +169,7 @@ end
function this.RequestPay(context)
local price = MoneyUtil.GetMoney(context.Price)
local price = MoneyUtil.GetMoneyNoZheKou(context.Price)
SDKMgr.onPayCallback = function(payResp)
Log("onPayCallback::"..payResp)