8
0
gaore-common-sdk-go/services/asdk/pay_switch.go
yuxh 7097afb18c feat(pay): 新增切支付名单中转与清缓存 SDK 接口
game 服务新增 GetPaySwitchUser(按 user_name+game_id 读 db_center 切支付名单,返回 status+risk_level);
asdk 服务新增 ClearPaySwitchCache(内网无签名,按 user_name+game_id 即时清切支付判定缓存)。
供 asdk/center 微信小游戏切支付功能调用。
2026-06-12 15:37:48 +08:00

43 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package asdk
import (
"strconv"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
// ClearPaySwitchCacheReq
// 清切支付名单判定缓存请求(内网无签名接口,按 user_name + game_id 即时清 asdk 判定缓存)
type ClearPaySwitchCacheReq struct {
*requests.RpcRequest
}
type ClearPaySwitchCacheResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct{} `json:"data"`
TraceId string `json:"trace_id"`
}
// CreateClearPaySwitchCacheReq 构造清缓存请求user_name + game_id
func CreateClearPaySwitchCacheReq(userName string, gameId int64) *ClearPaySwitchCacheReq {
req := &ClearPaySwitchCacheReq{
RpcRequest: &requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/api/vip/clear_pay_switch_cache")
req.Method = requests.POST
req.FormParams = map[string]string{
"user_name": userName,
"game_id": strconv.FormatInt(gameId, 10),
}
return req
}
func CreateClearPaySwitchCacheResp() *ClearPaySwitchCacheResp {
return &ClearPaySwitchCacheResp{
BaseResponse: &responses.BaseResponse{},
}
}