Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) GetApiKey() string
- func (c *Client) GetApiURL() string
- func (c *Client) GetPartnerID() int64
- func (c *Client) PaymentDfpayAddorder(ctx context.Context, partnerOrderNo string, Type int, account string, ...) (*PaymentDfpayAddorderResult, error)
- func (c *Client) PaymentDfpayClose(ctx context.Context, partnerOrderNo string, notMustParams ...*gorequest.Params) (*PaymentDfpayCloseResult, error)
- func (c *Client) PaymentDfpayQuery(ctx context.Context, partnerOrderNo string, notMustParams ...*gorequest.Params) (*PaymentDfpayQueryResult, error)
- func (c *Client) SetApiKey(v string) *Client
- func (c *Client) SetApiURL(v string) *Client
- func (c *Client) SetClientIP(clientIP string) *Client
- func (c *Client) SetLogFun(logFun gorequest.LogFunc)
- func (c *Client) SetPartnerID(v int64) *Client
- type ClientConfig
- type PaymentDfpayAddorderResponse
- type PaymentDfpayAddorderResult
- type PaymentDfpayCloseResponse
- type PaymentDfpayCloseResult
- type PaymentDfpayQueryResponse
- type PaymentDfpayQueryResult
Constants ¶
View Source
const (
CodeSuccess = 1 // 成功
)
View Source
const (
LogTable = "x7s"
)
View Source
const (
Version = "1.0.10"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) GetPartnerID ¶
func (*Client) PaymentDfpayAddorder ¶
func (c *Client) PaymentDfpayAddorder(ctx context.Context, partnerOrderNo string, Type int, account string, amount float64, notifyUrl string, notMustParams ...*gorequest.Params) (*PaymentDfpayAddorderResult, error)
PaymentDfpayAddorder 统一下单接口 https://gys.x7s.com/Home_Index_documenta.html#doc6
func (*Client) PaymentDfpayClose ¶
func (c *Client) PaymentDfpayClose(ctx context.Context, partnerOrderNo string, notMustParams ...*gorequest.Params) (*PaymentDfpayCloseResult, error)
PaymentDfpayClose 取消订单 https://gys.x7s.com/Home_Index_documenta.html#doc9
func (*Client) PaymentDfpayQuery ¶
func (c *Client) PaymentDfpayQuery(ctx context.Context, partnerOrderNo string, notMustParams ...*gorequest.Params) (*PaymentDfpayQueryResult, error)
PaymentDfpayQuery 核销查询接口 https://gys.x7s.com/Home_Index_documenta.html#doc8
func (*Client) SetPartnerID ¶
type ClientConfig ¶
type ClientConfig struct { ApiURL string `json:"api_url"` // 接口地址 PartnerID int64 `json:"partner_id"` // 平台分配商户号 ApiKey string `json:"api_key"` // 渠道分配的密钥 }
ClientConfig 实例配置
type PaymentDfpayAddorderResponse ¶
type PaymentDfpayAddorderResponse struct { Code int `json:"code"` // 0=错误 1=成功 Msg string `json:"msg"` // 描述 Data struct { Status string `json:"status"` // 状态 -1=删除 0=可用 90=关闭 PartnerId string `json:"partner_id"` // 供应商ID PartnerOrderNo string `json:"partner_order_no"` // 供应商订单号 Account string `json:"account"` // 账号 Amount string `json:"amount"` // 金额 ChargeAmount string `json:"charge_amount"` // 收费金额 } `json:"data,omitempty"` }
type PaymentDfpayAddorderResult ¶
type PaymentDfpayAddorderResult struct { Result PaymentDfpayAddorderResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type PaymentDfpayCloseResult ¶
type PaymentDfpayCloseResult struct { Result PaymentDfpayCloseResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
type PaymentDfpayQueryResponse ¶
type PaymentDfpayQueryResponse struct { Code int `json:"code"` // 0=错误 1=成功 Msg string `json:"msg"` // 描述 Data struct { Status string `json:"status"` // 状态 -1=删除 0=可用 90=关闭 PartnerId string `json:"partner_id"` // 供应商ID PartnerOrderNo string `json:"partner_order_no"` // 供应商订单号 Account string `json:"account"` // 账号 Amount string `json:"amount"` // 金额 ChargeAmount string `json:"charge_amount"` // 收费金额 } `json:"data,omitempty"` }
type PaymentDfpayQueryResult ¶
type PaymentDfpayQueryResult struct { Result PaymentDfpayQueryResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 }
Click to show internal directories.
Click to hide internal directories.