client

package
v0.0.0-...-850f758 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config *service.Config
}

func NewClient

func NewClient(appId string, priKey *rsa.PrivateKey, openPubKey *rsa.PublicKey) *Client

func (*Client) CashOrder

func (c *Client) CashOrder(userOpenId, outTradeNo, amount, remark string) (*service.Response, error)

CashOrder

@Description: 提现订单
@receiver c
@param userOpenId 用户openid
@param outTradeNo 提现订单号  商户下唯一
@param amount  提现金额
@param remark  备注信息
@return *service.Response
@return error

func (*Client) CashOrderQuery

func (c *Client) CashOrderQuery(outTradeNo string) (*service.Response, error)

CashOrderQuery

@Description: 提现订单查询
@receiver c
@param outTradeNo
@return *service.Response
@return error

func (*Client) CreatedOrder

func (c *Client) CreatedOrder(outTradeNo, amount, subject, timeExpire, remark, notifyUrl, passBackParams string) (string, error)

CreatedOrder

@Description: 创建支付订单
@receiver c
@param outTradeNo  商户订单号, 同一个商户下唯一
@param amount  金额
@param subject  订单标题
@param timeExpire 支付超时时间, 遵循rfc3339标准格式  示例:2024-12-05T10:41:26+08:00
@param remark  订单备注
@param notifyUrl  回调地址
@param passBackParams  额外信息, 回调时候原样返回

func (*Client) GetAccessToken

func (c *Client) GetAccessToken(code string) (*service.Response, error)

func (*Client) GetAuthInfo

func (c *Client) GetAuthInfo(scop, state string) (string, error)

func (*Client) GetUserInfo

func (c *Client) GetUserInfo(accessToken string) (*service.Response, error)

func (*Client) OrderCancel

func (c *Client) OrderCancel(outTradeNo string) (*service.Response, error)

OrderCancel

@Description: 订单取消
@receiver c
@param outTradeNo  商户订单号
@return *service.Response
@return error

func (*Client) OrderQuery

func (c *Client) OrderQuery(outTradeNo string) (*service.Response, error)

OrderQuery

@Description: 订单查询
@receiver c
@param outTradeNo
@return *service.Response
@return error

func (*Client) OrderRefund

func (c *Client) OrderRefund(outTradeNo string, refundNo string) (*service.Response, error)

OrderRefund

@Description:
@receiver c
@param outTradeNo  商户订单号
@param refundNo   退款请求号
@return map[string]any   如果存在 errorCode, 说明开放平台返回了错误信息, 根据对应的错误码以及错误信息处理  不存在 errorCode, 开放平台返回了正常业务信息
@return error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL