 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func NewMockPayClient(channelId uint64, config model.ClientConfig) model.Client
- func ParseMockClientConfig(config string) (model.ClientConfig, error)
- type Client
- func (c *Client) GetId() uint64
- func (c *Client) GetOrder(ctx context.Context, outTradeNo string) (*model.OrderResp, error)
- func (c *Client) Init() error
- func (c *Client) ParseOrderNotify(r []byte) (*model.OrderResp, error)
- func (c *Client) Refresh(config model.ClientConfig) error
- func (c *Client) UnifiedOrder(ctx context.Context, code string, req model.OrderUnifiedReq) (*model.OrderResp, error)
- func (c *Client) UnifiedRefund(ctx context.Context, req model.RefundUnifiedReq) (*model.RefundResp, error)
 
- type ClientConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMockPayClient ¶
func NewMockPayClient(channelId uint64, config model.ClientConfig) model.Client
func ParseMockClientConfig ¶
func ParseMockClientConfig(config string) (model.ClientConfig, error)
Types ¶
type Client ¶
type Client struct {
	ChannelId uint64
	Config    *ClientConfig
}
    Client 结构体实现了 model.Client 接口
func (*Client) ParseOrderNotify ¶
func (*Client) UnifiedOrder ¶
func (*Client) UnifiedRefund ¶
func (c *Client) UnifiedRefund(ctx context.Context, req model.RefundUnifiedReq) (*model.RefundResp, error)
type ClientConfig ¶
type ClientConfig struct {
	Name string
}
    ClientConfig 实现了 model.ClientConfig 接口 模拟支付方便调试
func (ClientConfig) Validate ¶
func (p ClientConfig) Validate() error
 Click to show internal directories. 
   Click to hide internal directories.