Versions in this module Expand all Collapse all v1 v1.5.93 Mar 14, 2023 v1.5.92 Mar 13, 2023 Changes in this version + const SignType_HMAC_SHA256 + const SignType_MD5 + const TradeType_App + const TradeType_JsApi + const TradeType_MicroPay + const TradeType_Mini + const TradeType_Native + func GetReleaseSign(apiKey string, signType string, bm gopay.BodyMap) (sign string) + func ParseNotifyToBodyMap(req *http.Request) (bm gopay.BodyMap, err error) + func VerifySign(apiKey, signType string, bean interface{}) (ok bool, err error) + type AccessToken struct + AccessToken string + ExpiresIn string + RefreshToken string + func GetAccessToken(ctx context.Context, appId, appSecret, code, redirectUri string) (accessToken *AccessToken, err error) + type Client struct + ApiKey string + DebugSwitch gopay.DebugSwitch + IsProd bool + MchId string + func NewClient(mchId, apiKey string) (client *Client) + func (q *Client) AccRoll(ctx context.Context, bm gopay.BodyMap) (qqRsp string, err error) + func (q *Client) AddCertFileContent(certFileContent, keyFileContent, pkcs12FileContent []byte) (err error) + func (q *Client) AddCertFilePath(certFilePath, keyFilePath, pkcs12FilePath interface{}) (err error) + func (q *Client) CloseOrder(ctx context.Context, bm gopay.BodyMap) (qqRsp *CloseOrderResponse, err error) + func (q *Client) DownloadRedListFile(ctx context.Context, bm gopay.BodyMap) (qqRsp string, err error) + func (q *Client) MicroPay(ctx context.Context, bm gopay.BodyMap) (qqRsp *MicroPayResponse, err error) + func (q *Client) OrderQuery(ctx context.Context, bm gopay.BodyMap) (qqRsp *OrderQueryResponse, err error) + func (q *Client) PostQQAPISelf(ctx context.Context, bm gopay.BodyMap, url string, tlsConfig *tls.Config) (bs []byte, err error) + func (q *Client) QueryRedInfo(ctx context.Context, bm gopay.BodyMap) (qqRsp *QueryRedInfoResponse, err error) + func (q *Client) Refund(ctx context.Context, bm gopay.BodyMap, ...) (qqRsp *RefundResponse, err error) + func (q *Client) RefundQuery(ctx context.Context, bm gopay.BodyMap) (qqRsp *RefundQueryResponse, err error) + func (q *Client) Reverse(ctx context.Context, bm gopay.BodyMap) (qqRsp *ReverseResponse, err error) + func (q *Client) SendCashRed(ctx context.Context, bm gopay.BodyMap, ...) (qqRsp *SendCashRedResponse, err error) + func (q *Client) SetBodySize(sizeMB int) + func (q *Client) StatementDown(ctx context.Context, bm gopay.BodyMap) (qqRsp string, err error) + func (q *Client) UnifiedOrder(ctx context.Context, bm gopay.BodyMap) (qqRsp *UnifiedOrderResponse, err error) + type CloseOrderResponse struct + Appid string + ErrCode string + ErrCodeDes string + MchId string + NonceStr string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + type Detail struct + Uin []string + type MicroPayResponse struct + Appid string + Attach string + BankType string + CashFee string + CouponFee string + CouponFee0 string + CouponFee1 string + DeviceInfo string + ErrCode string + ErrCodeDes string + FeeType string + MchId string + NonceStr string + Openid string + OutTradeNo string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + TimeEnd string + TotalFee string + TradeState string + TradeStateDesc string + TradeType string + TransactionId string + type NotifyRequest struct + Appid string + Attach string + BankType string + CashFee string + CouponFee string + DeviceInfo string + FeeType string + MchId string + NonceStr string + Openid string + OutTradeNo string + Sign string + TimeEnd string + TotalFee string + TradeState string + TradeType string + TransactionId string + func ParseNotify(req *http.Request) (notifyReq *NotifyRequest, err error) + type NotifyResponse struct + ReturnCode string + ReturnMsg string + func (w *NotifyResponse) ToXmlString() (xmlStr string) + type OpenIdInfo struct + ClientId string + Error int + ErrorDescription string + OpenId string + UnionId string + func GetOpenId(ctx context.Context, accessToken string, lang ...string) (openid *OpenIdInfo, err error) + type OrderQueryResponse struct + Appid string + Attach string + BankType string + CashFee string + CouponFee string + DeviceInfo string + ErrCode string + ErrCodeDes string + FeeType string + MchId string + NonceStr string + Openid string + OutTradeNo string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + TimeEnd string + TotalFee string + TradeState string + TradeStateDesc string + TradeType string + TransactionId string + type QueryRedInfoResponse struct + Listid string + RecvAmount string + RecvDetails *Detail + RecvNum string + ResInfo string + Result string + State string + TotalAmount string + TotalNum string + type RefundQueryResponse struct + Appid string + CashFee string + CashRefundFee0 string + CashRefundFee1 string + CouponRefundFee0 string + CouponRefundFee1 string + ErrCode string + ErrCodeDes string + FeeType string + MchId string + NonceStr string + OutRefundNo0 string + OutRefundNo1 string + OutTradeNo string + RefundChannel0 string + RefundChannel1 string + RefundFee0 string + RefundFee1 string + RefundId0 string + RefundId1 string + RefundRecvAccout0 string + RefundRecvAccout1 string + RefundStatus0 string + RefundStatus1 string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + TotalFee string + TransactionId string + type RefundResponse struct + Appid string + ErrCode string + ErrCodeDes string + MchId string + NonceStr string + OutRefundNo string + OutTradeNo string + RefundChannel string + RefundFee string + RefundId string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + TotalFee string + TransactionId string + type ReverseResponse struct + Appid string + ErrCode string + ErrCodeDes string + MchId string + NonceStr string + Recall string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + SubAppid string + SubMchId string + type SendCashRedResponse struct + Listid string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + type UnifiedOrderResponse struct + Appid string + CodeUrl string + ErrCode string + ErrCodeDes string + MchId string + NonceStr string + PrepayId string + ResultCode string + RetCode string + RetMsg string + ReturnCode string + ReturnMsg string + Sign string + TradeType string + type UserInfo struct + Figureurl string + Figureurl1 string + Figureurl2 string + FigureurlQq1 string + FigureurlQq2 string + Gender string + IsYellowVip string + IsYellowYearVip string + Level string + Msg string + Nickname string + Ret int + Vip string + YellowVipLevel string + func GetUserInfo(ctx context.Context, accessToken, openId string, oauthConsumerKey string, ...) (userInfo *UserInfo, err error)