sdk:37ios支付及退款

This commit is contained in:
luying
2022-03-31 16:15:49 +08:00
parent 9da83c56be
commit 76fe3adb7f
15 changed files with 275 additions and 14 deletions

View File

@@ -63,7 +63,14 @@ export function get37GetServerMd5Sign(body: GetServerListParam, key: string) {
return sign
}
export async function loginValidate37(clientId: string, pst: string, platformAppid: string = SDK_37_CONST.PID, childGameId: number = SDK_37_CONST.FX_C_GAME_ID) {
export async function loginValidate37(clientId: string, pst: string, platform: string, platformAppid: string, childGameId: number = SDK_37_CONST.FX_C_GAME_ID) {
if(!platformAppid) {
if(platform == 'android') {
platformAppid = SDK_37_CONST.PID;
} else if(platform == 'ios' ){
platformAppid = SDK_37_CONST.IOS_PID;
}
}
let result: string = await request37(SDK_37_ADDR.LOGIN, {
clientid: clientId,
pid: platformAppid,
@@ -86,10 +93,10 @@ export async function loginValidate37(clientId: string, pst: string, platformApp
return json;
}
export async function loginValidata(channelType: string, params: { clientId: string, pst: string, platformAppid: string, childGameId: number }) {
export async function loginValidata(channelType: string, params: { clientId: string, pst: string, platform: string, platformAppid: string, childGameId: number }) {
if(channelType == '37') {
let { clientId, pst, platformAppid, childGameId } = params;
return await loginValidate37(clientId, pst, platformAppid, childGameId);
let { clientId, pst, platform, platformAppid, childGameId } = params;
return await loginValidate37(clientId, pst, platform, platformAppid, childGameId);
} else {
return false;
}