7
0

新增手动补单接口

This commit is contained in:
许 洋 2026-05-09 14:39:59 +08:00
parent 2f35803893
commit 72cf3a46dd
3 changed files with 81 additions and 0 deletions

View File

@ -102,3 +102,10 @@ func (c *Client) GetUserVoucher(req *GetUserVoucherRequest) (response *GetUserVo
err = c.DoAction(req, response) err = c.DoAction(req, response)
return return
} }
// ManualReplenish 手动补单
func (c *Client) ManualReplenish(req *ManualReplenishRequest) (response *ManualReplenishResponse, err error) {
response = CreateManualReplenishResponse()
err = c.DoAction(req, response)
return
}

View File

@ -39,3 +39,25 @@ func TestGetOrderState(t *testing.T) {
} }
t.Log(getOrderStateResponse.GetHttpContentString()) t.Log(getOrderStateResponse.GetHttpContentString())
} }
func TestManualReplenish(t *testing.T) {
client, err := NewClient()
if err != nil {
t.Error(err)
return
}
req := CreateManualReplenishRequest(ManualReplenishParam{
GameId: 100,
Money: 6,
OrderId: "202112060000193551730",
UserName: "testuser",
PayChannel: 1,
PayChannelType: 0,
})
resp, err := client.ManualReplenish(req)
if err != nil {
t.Error(err)
return
}
t.Log(resp.GetHttpContentString())
}

View File

@ -0,0 +1,52 @@
package pay
import (
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
)
type ManualReplenishParam struct {
GameId int64
Money int64
OrderId string
UserName string
PayChannel int64
PayChannelType int64
}
type ManualReplenishRequest struct {
*requests.RpcRequest
GameId int64 `position:"Body" field:"game_id"`
Money int64 `position:"Body" field:"money"`
OrderId string `position:"Body" field:"order_id"`
UserName string `position:"Body" field:"user_name"`
PayChannel int64 `position:"Body" field:"pay_channel"`
PayChannelType int64 `position:"Body" field:"pay_channel_type"`
}
type ManualReplenishResponse struct {
*responses.BaseResponse
State int `json:"state"`
Msg string `json:"msg"`
}
func CreateManualReplenishRequest(param ManualReplenishParam) *ManualReplenishRequest {
req := &ManualReplenishRequest{
RpcRequest: &requests.RpcRequest{},
GameId: param.GameId,
Money: param.Money,
OrderId: param.OrderId,
UserName: param.UserName,
PayChannel: param.PayChannel,
PayChannelType: param.PayChannelType,
}
req.InitWithApiInfo(HOST, VERSION, "/api/sdk/manualReplenish")
req.Method = requests.POST
return req
}
func CreateManualReplenishResponse() *ManualReplenishResponse {
return &ManualReplenishResponse{
BaseResponse: &responses.BaseResponse{},
}
}