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
- func (c *Client) SetTrace(trace bool)
- func (c *Client) TraceEndSpan()
- func (c *Client) TraceGetSpanID() (spanID string)
- func (c *Client) TraceGetTraceID() (traceID string)
- func (c *Client) TraceRecordError(err error, options ...trace.EventOption)
- func (c *Client) TraceSetAttributes(kv ...attribute.KeyValue)
- func (c *Client) TraceSetStatus(code codes.Code, description string)
- func (c *Client) TraceStartSpan(ctx context.Context, spanName string) context.Context
- 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.5"
)
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) SetClientIP ¶ added in v1.0.3
SetClientIP 配置
func (*Client) SetPartnerID ¶
func (*Client) TraceEndSpan ¶ added in v1.0.3
func (c *Client) TraceEndSpan()
TraceEndSpan 结束OpenTelemetry链路追踪状态
func (*Client) TraceGetSpanID ¶ added in v1.0.3
TraceGetSpanID 获取OpenTelemetry链路追踪SpanID
func (*Client) TraceGetTraceID ¶ added in v1.0.3
TraceGetTraceID 获取OpenTelemetry链路追踪TraceID
func (*Client) TraceRecordError ¶ added in v1.0.3
func (c *Client) TraceRecordError(err error, options ...trace.EventOption)
TraceRecordError 记录OpenTelemetry链路追踪错误
func (*Client) TraceSetAttributes ¶ added in v1.0.3
TraceSetAttributes 设置OpenTelemetry链路追踪属性
func (*Client) TraceSetStatus ¶ added in v1.0.3
TraceSetStatus 设置OpenTelemetry链路追踪状态
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.