Documentation ¶
Index ¶
- Constants
- type AddProductOrderResponse
- type AddProductOrderResult
- type Client
- func (c *Client) AddProductOrder(ctx context.Context, Type int64, mobile string, tradeID string, amount int64, ...) (*AddProductOrderResult, error)
- func (c *Client) ConfigClient(config *ClientConfig)
- func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)
- func (c *Client) DefaultHttp()
- func (c *Client) GetKey() string
- func (c *Client) GetMchID() int64
- func (c *Client) QuerySupplierOrderInfo(ctx context.Context, tradeID string, notMustParams ...gorequest.Params) (*QuerySupplierOrderInfoResult, error)
- func (c *Client) SetApiURL(apiURL string)
- func (c *Client) SetAppKey(key string)
- func (c *Client) SetHttp(app *gorequest.App)
- func (c *Client) SetMchID(mchID int64)
- func (c *Client) SupplierBalance(ctx context.Context, notMustParams ...gorequest.Params) (*SupplierBalanceResult, error)
- type ClientConfig
- type QuerySupplierOrderInfoResponse
- type QuerySupplierOrderInfoResult
- type SupplierBalanceResponse
- type SupplierBalanceResult
Constants ¶
View Source
const ( CodeSuccess = 1 CodeError = -1 )
View Source
const (
LogTable = "praise_goodness"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddProductOrderResponse ¶
type AddProductOrderResult ¶ added in v1.0.197
type AddProductOrderResult struct { Result AddProductOrderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) AddProductOrder ¶
func (c *Client) AddProductOrder(ctx context.Context, Type int64, mobile string, tradeID string, amount int64, official int64, area string, notifyurl string, notMustParams ...gorequest.Params) (*AddProductOrderResult, error)
AddProductOrder 下单接口 type = 固定值:1 mobile = 充值账号 trade_id = 商户订单号,10-32位 amount = 充值金额,单位 (元) ,只传整 数不带小数点,例如:100 official = 运营商 1 :中国移动 2 :中国联通 3 :中国电信 area = 归属地,填省份,如:山东,北京 ,内蒙古,黑龙江,重庆 填:auto,系统自动识别归属地 notifyurl = 回调通知地址
func (*Client) ConfigClient ¶
func (c *Client) ConfigClient(config *ClientConfig)
func (*Client) ConfigSLogClientFun ¶
func (c *Client) ConfigSLogClientFun(apiSLogFun golog.ApiSLogFun)
ConfigSLogClientFun 日志配置
func (*Client) QuerySupplierOrderInfo ¶
func (c *Client) QuerySupplierOrderInfo(ctx context.Context, tradeID string, notMustParams ...gorequest.Params) (*QuerySupplierOrderInfoResult, error)
QuerySupplierOrderInfo 订单查询接口 trade_id = 商户订单号
func (*Client) SupplierBalance ¶
func (c *Client) SupplierBalance(ctx context.Context, notMustParams ...gorequest.Params) (*SupplierBalanceResult, error)
SupplierBalance 用户余额查询接口
type ClientConfig ¶
ClientConfig 实例配置
type QuerySupplierOrderInfoResponse ¶
type QuerySupplierOrderInfoResponse struct { Code int `json:"code"` // 1:请求成功 -1:请求失败 Msg string `json:"msg"` // 返回说明 Time string `json:"time"` // 时间戳 Data struct { OrderID string `json:"order_id"` // 我方订单号 TradeID string `json:"trade_id"` // 商户订单号 Status int `json:"status"` // 88:充值成功 22:充值失败 66:充值中 55:订单不存在 Voucher string `json:"voucher"` // 充值凭证 (有可能为空值,不一定返回) Createtime int `json:"createtime"` // 订单创建时间 Proof string `json:"proof"` // 请求token } `json:"data"` }
func (QuerySupplierOrderInfoResponse) GetStatusDesc ¶
func (QuerySupplierOrderInfoResponse) GetStatusDesc(status int) string
type QuerySupplierOrderInfoResult ¶ added in v1.0.197
type QuerySupplierOrderInfoResult struct { Result QuerySupplierOrderInfoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type SupplierBalanceResponse ¶
type SupplierBalanceResult ¶ added in v1.0.197
type SupplierBalanceResult struct { Result SupplierBalanceResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
Click to show internal directories.
Click to hide internal directories.