新增手动补单接口
This commit is contained in:
parent
2f35803893
commit
72cf3a46dd
@ -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
|
||||||
|
}
|
||||||
|
|||||||
@ -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())
|
||||||
|
}
|
||||||
|
|||||||
52
services/pay/manual_replenish.go
Normal file
52
services/pay/manual_replenish.go
Normal 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{},
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user