wechatpayopen

package
v1.0.141 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignatureMessageFormat = "%s\n%s\n%d\n%s\n%s\n" // 数字签名原文格式
	// HeaderAuthorizationFormat 请求头中的 Authorization 拼接格式
	HeaderAuthorizationFormat = "%s mchid=\"%s\",nonce_str=\"%s\",timestamp=\"%d\",serial_no=\"%s\",signature=\"%s\""
)

请求报文签名相关常量

View Source
const (
	CodeSUCCESS    = "SUCCESS"    // 支付成功 退款成功
	CodeREFUND     = "REFUND"     // 转入退款
	CodeNOTPAY     = "NOTPAY"     // 未支付
	CodeCLOSED     = "CLOSED"     // 已关闭 退款关闭
	CodeREVOKED    = "REVOKED"    // 已撤销
	CodeUSERPAYING = "USERPAYING" // 用户支付中
	CodePAYERROR   = "PAYERROR"   // 支付失败
	CodePROCESSING = "PROCESSING" // 退款处理中
	CodeABNORMAL   = "ABNORMAL"   // 退款异常
)

接口状态

View Source
const (
	MERCHANT_ID         = "MERCHANT_ID"
	PERSONAL_OPENID     = "PERSONAL_OPENID"
	PERSONAL_SUB_OPENID = "PERSONAL_SUB_OPENID"
)
View Source
const (
	LogTable = "wechatpayopen"
)

SDK 相关信息

View Source
const (
	WechatPayAPIServerBackup = "https://api2.mch.weixin.qq.com" // 微信支付 API 备份地址
)

微信支付 API 地址

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiError

type ApiError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type BillFundFlowBillGetResponse added in v1.0.88

type BillFundFlowBillGetResponse struct {
	DownloadUrl string `json:"download_url"` // 哈希类型
	HashType    string `json:"hash_type"`    // 哈希值
	HashValue   string `json:"hash_value"`   // 账单下载地址
}

type BillFundFlowBillGetResult added in v1.0.88

type BillFundFlowBillGetResult struct {
	Result   BillFundFlowBillGetResponse // 结果
	Body     []byte                      // 内容
	Http     gorequest.Response          // 请求
	Err      error                       // 错误
	ApiError ApiError                    // 接口错误
}

type BillTradeBillGetResponse added in v1.0.88

type BillTradeBillGetResponse struct {
	DownloadUrl string `json:"download_url"` // 哈希类型
	HashType    string `json:"hash_type"`    // 哈希值
	HashValue   string `json:"hash_value"`   // 账单下载地址
}

type BillTradeBillGetResult added in v1.0.88

type BillTradeBillGetResult struct {
	Result   BillTradeBillGetResponse // 结果
	Body     []byte                   // 内容
	Http     gorequest.Response       // 请求
	Err      error                    // 错误
	ApiError ApiError                 // 接口错误
}

type CertificatesResponse

type CertificatesResponse struct {
	Data []struct {
		EffectiveTime      time.Time `json:"effective_time"` // 过期时间
		EncryptCertificate struct {
			Algorithm      string `json:"algorithm"`
			AssociatedData string `json:"associated_data"`
			Ciphertext     string `json:"ciphertext"`
			Nonce          string `json:"nonce"`
		} `json:"encrypt_certificate"` // 加密证书
		ExpireTime time.Time `json:"expire_time"` // 有效时间
		SerialNo   string    `json:"serial_no"`   // 序列号
	} `json:"data"`
}

type CertificatesResult

type CertificatesResult struct {
	Result CertificatesResponse // 结果
	Body   []byte               // 内容
	Http   gorequest.Response   // 请求
	Err    error                // 错误
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client 实例

func NewClient

func NewClient(config *ClientConfig) (*Client, error)

NewClient 创建实例化

func (*Client) BillFundFlowBillGet added in v1.0.88

func (c *Client) BillFundFlowBillGet(ctx context.Context, notMustParams ...gorequest.Params) *BillFundFlowBillGetResult

BillFundFlowBillGet 申请资金账单API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_7.shtml

func (*Client) BillTradeBillGet added in v1.0.88

func (c *Client) BillTradeBillGet(ctx context.Context, notMustParams ...gorequest.Params) *BillTradeBillGetResult

BillTradeBillGet 申请交易账单API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_6.shtml

func (*Client) Certificates

func (c *Client) Certificates(ctx context.Context) *CertificatesResult

Certificates 获取平台证书列表 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/wechatpay5_1.shtml

func (*Client) ConfigApiClientFun added in v1.0.52

func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)

ConfigApiClientFun 日志配置

func (*Client) ConfigZapClientFun added in v1.0.141

func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)

ConfigZapClientFun 日志配置

func (*Client) EcommerceFundBalance

func (c *Client) EcommerceFundBalance(ctx context.Context, accountType string) *EcommerceFundBalanceResult

EcommerceFundBalance 查询二级商户账户实时余额API accountType 账户类型 BASIC:基本账户 OPERATION:运营账户 FEES:手续费账户 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_7_1.shtml

func (*Client) EcommerceFundEndDayBalance

func (c *Client) EcommerceFundEndDayBalance(ctx context.Context, date string) *EcommerceFundEndDayBalanceResult

EcommerceFundEndDayBalance 查询二级商户账户日终余额API date 日期 示例值:2019-08-17 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_7_2.shtml

func (*Client) Get added in v1.0.109

func (c *Client) Get(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

func (*Client) GetApiV3 added in v1.0.52

func (c *Client) GetApiV3() string

func (*Client) GetJsApi

func (c *Client) GetJsApi(ctx context.Context, param GetJsApi) (result GetJsApiResult, err error)

GetJsApi JSAPI调起支付API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_4.shtml

func (*Client) GetLog added in v1.0.52

func (c *Client) GetLog() *golog.ApiClient

func (*Client) GetMchSslKey added in v1.0.52

func (c *Client) GetMchSslKey() string

func (*Client) GetMchSslSerialNo added in v1.0.52

func (c *Client) GetMchSslSerialNo() string

func (*Client) GetSpAppid

func (c *Client) GetSpAppid() string

func (*Client) GetSpMchId

func (c *Client) GetSpMchId() string

func (*Client) GetSubAppid

func (c *Client) GetSubAppid() string

func (*Client) GetSubMchId

func (c *Client) GetSubMchId() string

func (*Client) MerchantFundBalance

func (c *Client) MerchantFundBalance(ctx context.Context, accountType string) *MerchantFundBalanceResult

MerchantFundBalance 查询电商平台账户实时余额API accountType 账户类型 BASIC:基本账户 OPERATION:运营账户 FEES:手续费账户 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_7_3.shtml

func (*Client) MerchantFundDayEndBalance

func (c *Client) MerchantFundDayEndBalance(ctx context.Context, accountType, date string) *MerchantFundDayEndBalanceResult

MerchantFundDayEndBalance 查询电商平台账户日终余额API accountType 账户类型 BASIC:基本账户 OPERATION:运营账户 FEES:手续费账户 date 日期 示例值:2019-08-17 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_7_4.shtml

func (*Client) PayPartnerTransactionsH5

func (c *Client) PayPartnerTransactionsH5(ctx context.Context, notMustParams ...gorequest.Params) *PayPartnerTransactionsH5Result

PayPartnerTransactionsH5 H5下单API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_3_1.shtml

func (*Client) PayPartnerTransactionsId

func (c *Client) PayPartnerTransactionsId(ctx context.Context, transactionId string) *PayPartnerTransactionsIdResult

PayPartnerTransactionsId 微信支付订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_2.shtml

func (*Client) PayPartnerTransactionsIdTransactionIdGet added in v1.0.88

func (c *Client) PayPartnerTransactionsIdTransactionIdGet(ctx context.Context, transactionId string, notMustParams ...gorequest.Params) *PayPartnerTransactionsIdTransactionIdGetResult

PayPartnerTransactionsIdTransactionIdGet 微信支付订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_2.shtml

func (*Client) PayPartnerTransactionsJsapi

func (c *Client) PayPartnerTransactionsJsapi(ctx context.Context, notMustParams ...gorequest.Params) *PayPartnerTransactionsJsapiResult

PayPartnerTransactionsJsapi JSAPI下单 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_1.shtml

func (*Client) PayPartnerTransactionsJsapiNotifyGin added in v1.0.52

func (c *Client) PayPartnerTransactionsJsapiNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson PayPartnerTransactionsJsapiNotifyGinRequest, response PayPartnerTransactionsJsapiNotifyGinResponse, gcm []byte, err error)

PayPartnerTransactionsJsapiNotifyGin JSAPI下单 - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_5.shtml

func (*Client) PayPartnerTransactionsNativePost added in v1.0.88

func (c *Client) PayPartnerTransactionsNativePost(ctx context.Context, notMustParams ...gorequest.Params) *PayPartnerTransactionsNativePostResult

PayPartnerTransactionsNativePost Native下单API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_1.shtml

func (*Client) PayPartnerTransactionsNativePostNotifyGin added in v1.0.88

func (c *Client) PayPartnerTransactionsNativePostNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson PayPartnerTransactionsNativePostNotifyGinRequest, response PayPartnerTransactionsNativePostNotifyGinResponse, gcm []byte, err error)

PayPartnerTransactionsNativePostNotifyGin 支付通知API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_5.shtml

func (*Client) PayPartnerTransactionsOutTradeNo

func (c *Client) PayPartnerTransactionsOutTradeNo(ctx context.Context, outTradeNo string) *PayPartnerTransactionsOutTradeNoResult

PayPartnerTransactionsOutTradeNo 商户订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_2.shtml

func (*Client) PayPartnerTransactionsOutTradeNoClose

func (c *Client) PayPartnerTransactionsOutTradeNoClose(ctx context.Context, outTradeNo string) *PayPartnerTransactionsOutTradeNoCloseResult

PayPartnerTransactionsOutTradeNoClose 关闭订单API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_3.shtml

func (*Client) PayPartnerTransactionsOutTradeNoOutTradeNoClosePost added in v1.0.88

func (c *Client) PayPartnerTransactionsOutTradeNoOutTradeNoClosePost(ctx context.Context, outTradeNo string, notMustParams ...gorequest.Params) *PayPartnerTransactionsOutTradeNoOutTradeNoClosePostResult

PayPartnerTransactionsOutTradeNoOutTradeNoClosePost 关闭订单API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_3.shtml

func (*Client) PayPartnerTransactionsOutTradeNoOutTradeNoGet added in v1.0.89

func (c *Client) PayPartnerTransactionsOutTradeNoOutTradeNoGet(ctx context.Context, outTradeNo string) *PayPartnerTransactionsOutTradeNoOutTradeNoGetResult

PayPartnerTransactionsOutTradeNoOutTradeNoGet 商户订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_2.shtml

func (*Client) Post added in v1.0.109

func (c *Client) Post(ctx context.Context, _method string, notMustParams ...gorequest.Params) ([]byte, error)

func (*Client) ProfitSharingMerchantConfigs added in v1.0.52

func (c *Client) ProfitSharingMerchantConfigs(ctx context.Context) *ProfitSharingMerchantConfigsResult

ProfitSharingMerchantConfigs 查询最大分账比例API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_7.shtml

func (*Client) ProfitSharingOrders added in v1.0.52

func (c *Client) ProfitSharingOrders(ctx context.Context, notMustParams ...gorequest.Params) *ProfitSharingOrdersResult

ProfitSharingOrders 请求分账API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_1.shtml

func (*Client) ProfitSharingOrdersOutOrderNo added in v1.0.52

func (c *Client) ProfitSharingOrdersOutOrderNo(ctx context.Context, transactionId, outOrderNo string) *ProfitSharingOrdersOutOrderNoResult

ProfitSharingOrdersOutOrderNo 查询分账结果API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_2.shtml

func (*Client) ProfitSharingOrdersUnfreeze added in v1.0.52

func (c *Client) ProfitSharingOrdersUnfreeze(ctx context.Context, transactionId, outOrderNo, description string) *ProfitSharingOrdersUnfreezeResult

ProfitSharingOrdersUnfreeze 解冻剩余资金API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_5.shtml

func (*Client) ProfitSharingReceiversAdd added in v1.0.52

func (c *Client) ProfitSharingReceiversAdd(ctx context.Context, Type, account, name, relationType, customRelation string) *ProfitSharingReceiversAddResult

ProfitSharingReceiversAdd 添加分账接收方API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_8.shtml

func (*Client) ProfitSharingReceiversDelete added in v1.0.52

func (c *Client) ProfitSharingReceiversDelete(ctx context.Context, Type, account string) *ProfitSharingReceiversDeleteResult

ProfitSharingReceiversDelete 删除分账接收方API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_9.shtml

func (*Client) ProfitSharingReceiversNotifyGin added in v1.0.52

func (c *Client) ProfitSharingReceiversNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson ProfitSharingReceiversNotifyGinRequest, response ProfitSharingReceiversNotifyGinResponse, gcm []byte, err error)

ProfitSharingReceiversNotifyGin 分账动账通知API - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_5.shtml

func (*Client) ProfitSharingReturnOrders added in v1.0.52

func (c *Client) ProfitSharingReturnOrders(ctx context.Context, notMustParams ...gorequest.Params) *ProfitSharingReturnOrdersResult

ProfitSharingReturnOrders 请求分账回退API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_3.shtml

func (*Client) ProfitSharingReturnOrdersOutReturnNo added in v1.0.52

func (c *Client) ProfitSharingReturnOrdersOutReturnNo(ctx context.Context, outReturnNo, outOrderNo string) *ProfitSharingReturnOrdersOutReturnNoResult

ProfitSharingReturnOrdersOutReturnNo 查询分账回退结果API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_4.shtml

func (*Client) ProfitSharingTransactionsAmounts added in v1.0.52

func (c *Client) ProfitSharingTransactionsAmounts(ctx context.Context, transactionId string) *ProfitSharingTransactionsAmountsResult

ProfitSharingTransactionsAmounts 查询剩余待分金额API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter8_1_6.shtml

func (*Client) RefundDomesticRefunds

func (c *Client) RefundDomesticRefunds(ctx context.Context, notMustParams ...gorequest.Params) *RefundDomesticRefundsResult

RefundDomesticRefunds 申请退款API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_9.shtml

func (*Client) RefundDomesticRefundsNoNotifyGin added in v1.0.52

func (c *Client) RefundDomesticRefundsNoNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson RefundDomesticRefundsNoNotifyGinRequest, response RefundDomesticRefundsNoNotifyGinResponse, gcm []byte, err error)

RefundDomesticRefundsNoNotifyGin 申请退款API - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_11.shtml

func (*Client) RefundDomesticRefundsOutRefundNo

func (c *Client) RefundDomesticRefundsOutRefundNo(ctx context.Context, outRefundNo string) *RefundDomesticRefundsOutRefundNoResult

RefundDomesticRefundsOutRefundNo 查询单笔退款API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_9.shtml

func (*Client) RefundDomesticRefundsOutRefundNoGet added in v1.0.88

func (c *Client) RefundDomesticRefundsOutRefundNoGet(ctx context.Context, outRefundNo string, notMustParams ...gorequest.Params) *RefundDomesticRefundsOutRefundNoGetResult

RefundDomesticRefundsOutRefundNoGet 查询单笔退款API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_10.shtml

func (*Client) RefundDomesticRefundsPost added in v1.0.88

func (c *Client) RefundDomesticRefundsPost(ctx context.Context, outRefundNo string, notMustParams ...gorequest.Params) *RefundDomesticRefundsPostResult

RefundDomesticRefundsPost 申请退款API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_9.shtml

func (*Client) RefundDomesticRefundsPostNotifyGin added in v1.0.88

func (c *Client) RefundDomesticRefundsPostNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson RefundDomesticRefundsPostNotifyGinRequest, response RefundDomesticRefundsPostNotifyGinResponse, gcm []byte, err error)

RefundDomesticRefundsPostNotifyGin 退款结果通知API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_4_11.shtml

func (*Client) SignDecrypt added in v1.0.52

func (c *Client) SignDecrypt(aesKey, associatedData, nonce, ciphertext string) ([]byte, error)

func (*Client) SubConfig

func (c *Client) SubConfig(subAppid, subMchId string) *Client

SubConfig 子商户配置

type ClientConfig added in v1.0.52

type ClientConfig struct {
	SpAppid        string `json:"sp_appid"`  // 服务商应用ID
	SpMchId        string `json:"sp_mch_id"` // 服务商户号
	ApiV2          string // APIv2密钥
	ApiV3          string // APIv3密钥
	SerialNo       string // 序列号
	MchSslSerialNo string // pem 证书号
	MchSslCer      string // pem 内容
	MchSslKey      string // pem key 内容
}

ClientConfig 实例配置

type EcommerceFundBalanceResponse

type EcommerceFundBalanceResponse struct {
	SubMchid        string `json:"sub_mchid"`        // 二级商户号
	AccountType     string `json:"account_type"`     // 账户类型
	AvailableAmount int64  `json:"available_amount"` // 可用余额
	PendingAmount   int64  `json:"pending_amount"`   // 不可用余额
}

type EcommerceFundBalanceResult

type EcommerceFundBalanceResult struct {
	Result EcommerceFundBalanceResponse // 结果
	Body   []byte                       // 内容
	Http   gorequest.Response           // 请求
	Err    error                        // 错误
}

type EcommerceFundEndDayBalanceResponse

type EcommerceFundEndDayBalanceResponse struct {
	SubMchid        string `json:"sub_mchid"`        // 二级商户号
	AvailableAmount int64  `json:"available_amount"` // 可用余额
	PendingAmount   int64  `json:"pending_amount"`   // 不可用余额
}

type EcommerceFundEndDayBalanceResult

type EcommerceFundEndDayBalanceResult struct {
	Result EcommerceFundEndDayBalanceResponse // 结果
	Body   []byte                             // 内容
	Http   gorequest.Response                 // 请求
	Err    error                              // 错误
}

type GetJsApi

type GetJsApi struct {
	Package string `json:"package"`
}

GetJsApi 入参

type GetJsApiResult

type GetJsApiResult struct {
	AppId     string `json:"app_id"`     // 应用ID
	TimeStamp string `json:"time_stamp"` // 时间戳
	NonceStr  string `json:"nonce_str"`  // 随机字符串
	Package   string `json:"package"`    // 订单详情扩展字符串
	SignType  string `json:"sign_type"`  // 签名方式
	PaySign   string `json:"pay_sign"`   // 签名
}

GetJsApiResult 返回参数

type MerchantFundBalanceResponse

type MerchantFundBalanceResponse struct {
	AvailableAmount int64 `json:"available_amount"` // 可用余额
	PendingAmount   int64 `json:"pending_amount"`   // 不可用余额
}

type MerchantFundBalanceResult

type MerchantFundBalanceResult struct {
	Result   MerchantFundBalanceResponse // 结果
	Body     []byte                      // 内容
	Http     gorequest.Response          // 请求
	Err      error                       // 错误
	ApiError ApiError                    // 接口错误
}

type MerchantFundDayEndBalanceResponse

type MerchantFundDayEndBalanceResponse struct {
	AvailableAmount int64 `json:"available_amount"` // 可用余额
	PendingAmount   int64 `json:"pending_amount"`   // 不可用余额
}

type MerchantFundDayEndBalanceResult

type MerchantFundDayEndBalanceResult struct {
	Result   MerchantFundDayEndBalanceResponse // 结果
	Body     []byte                            // 内容
	Http     gorequest.Response                // 请求
	Err      error                             // 错误
	ApiError ApiError                          // 接口错误
}

type PayPartnerTransactionsH5Response

type PayPartnerTransactionsH5Response struct {
	H5Url string `json:"h5_url"` // 支付跳转链接
}

type PayPartnerTransactionsH5Result

type PayPartnerTransactionsH5Result struct {
	Result   PayPartnerTransactionsH5Response // 结果
	Body     []byte                           // 内容
	Http     gorequest.Response               // 请求
	Err      error                            // 错误
	ApiError ApiError                         // 接口错误
}

type PayPartnerTransactionsIdResponse

type PayPartnerTransactionsIdResponse struct {
	Appid          string `json:"appid"`
	Mchid          string `json:"mchid"`
	OutTradeNo     string `json:"out_trade_no"`
	TransactionId  string `json:"transaction_id,omitempty"`
	TradeType      string `json:"trade_type,omitempty"`
	TradeState     string `json:"trade_state"`
	TradeStateDesc string `json:"trade_state_desc"`
	BankType       string `json:"bank_type,omitempty"`
	Attach         string `json:"attach,omitempty"`
	SuccessTime    string `json:"success_time,omitempty"`
	Payer          struct {
		Openid string `json:"openid"`
	} `json:"payer"`
	Amount struct {
		Total         int    `json:"total,omitempty"`
		PayerTotal    int    `json:"payer_total,omitempty"`
		Currency      string `json:"currency,omitempty"`
		PayerCurrency string `json:"payer_currency,omitempty"`
	} `json:"amount,omitempty"`
	SceneInfo struct {
		DeviceId string `json:"device_id,omitempty"`
	}
	PromotionDetail []struct {
		CouponId            string `json:"coupon_id"`
		Name                string `json:"name,omitempty"`
		Scope               string `json:"scope,omitempty"`
		Type                string `json:"type,omitempty"`
		Amount              int    `json:"amount"`
		StockId             string `json:"stock_id,omitempty"`
		WechatpayContribute int    `json:"wechatpay_contribute,omitempty"`
		MerchantContribute  int    `json:"merchant_contribute,omitempty"`
		OtherContribute     int    `json:"other_contribute,omitempty"`
		Currency            string `json:"currency,omitempty"`
		GoodsDetail         []struct {
			GoodsId        string `json:"goods_id"`
			Quantity       int    `json:"quantity"`
			UnitPrice      int    `json:"unit_price"`
			DiscountAmount int    `json:"discount_amount"`
			GoodsRemark    string `json:"goods_remark,omitempty"`
		} `json:"goods_detail"`
	}
}

type PayPartnerTransactionsIdResult

type PayPartnerTransactionsIdResult struct {
	Result   PayPartnerTransactionsIdResponse // 结果
	Body     []byte                           // 内容
	Http     gorequest.Response               // 请求
	Err      error                            // 错误
	ApiError ApiError                         // 接口错误
}

type PayPartnerTransactionsIdTransactionIdGetResponse added in v1.0.88

type PayPartnerTransactionsIdTransactionIdGetResponse struct {
	SpAppid        string    `json:"sp_appid"`         // 服务商应用ID
	SpMchid        string    `json:"sp_mchid"`         // 服务商户号
	SubAppid       string    `json:"sub_appid"`        // 子商户应用ID
	SubMchid       string    `json:"sub_mchid"`        // 子商户号
	OutTradeNo     string    `json:"out_trade_no"`     // 商户订单号
	TransactionId  string    `json:"transaction_id"`   // 微信支付订单号
	TradeType      string    `json:"trade_type"`       // 交易类型
	TradeState     string    `json:"trade_state"`      // 交易状态
	TradeStateDesc string    `json:"trade_state_desc"` // 交易状态描述
	BankType       string    `json:"bank_type"`        // 付款银行
	Attach         string    `json:"attach"`           // 附加数据
	SuccessTime    time.Time `json:"success_time"`     // 支付完成时间
	Payer          struct {
		SpOpenid  string `json:"sp_openid"`  // 用户服务标识
		SubOpenid string `json:"sub_openid"` // 用户子标识
	} `json:"payer"` // 支付者
	Amount struct {
		Total         int    `json:"total"`          // 总金额
		PayerTotal    int    `json:"payer_total"`    // 用户支付金额
		Currency      string `json:"currency"`       // 货币类型
		PayerCurrency string `json:"payer_currency"` // 用户支付币种
	} `json:"amount"` // 订单金额
	SceneInfo struct {
		DeviceId string `json:"device_id"` // 商户端设备号
	} `json:"scene_info"` // 场景信息
	PromotionDetail []interface{} `json:"promotion_detail"` // 优惠功能
}

type PayPartnerTransactionsIdTransactionIdGetResult added in v1.0.88

type PayPartnerTransactionsIdTransactionIdGetResult struct {
	Result   PayPartnerTransactionsIdTransactionIdGetResponse // 结果
	Body     []byte                                           // 内容
	Http     gorequest.Response                               // 请求
	Err      error                                            // 错误
	ApiError ApiError                                         // 接口错误
}

type PayPartnerTransactionsJsapiNotifyGinRequest added in v1.0.52

type PayPartnerTransactionsJsapiNotifyGinRequest struct {
	Id           string `form:"id" json:"status" xml:"id" uri:"id" binding:"required"`                                         // 通知ID
	CreateTime   string `form:"create_time" json:"create_time" xml:"create_time" uri:"create_time" binding:"required"`         // 通知创建时间
	EventType    string `form:"event_type" json:"event_type" xml:"event_type" uri:"event_type" binding:"required"`             // 通知类型
	ResourceType string `form:"resource_type" json:"resource_type" xml:"resource_type" uri:"resource_type" binding:"required"` // 通知数据类型
	Resource     struct {
		Algorithm      string `form:"algorithm" json:"algorithm" xml:"algorithm" uri:"algorithm" binding:"required"`                          // 加密算法类型
		Ciphertext     string `form:"ciphertext" json:"ciphertext" xml:"ciphertext" uri:"ciphertext" binding:"required"`                      // 数据密文
		AssociatedData string `form:"associated_data" json:"associated_data" xml:"associated_data" uri:"associated_data" binding:"omitempty"` // 附加数据
		OriginalType   string `form:"original_type" json:"original_type" xml:"original_type" uri:"original_type" binding:"required"`          // 原始类型
		Nonce          string `form:"nonce" json:"nonce" xml:"nonce" uri:"nonce" binding:"required"`                                          // 随机串
	} `form:"resource" json:"resource" xml:"resource" uri:"resource" binding:"required"` // 通知数据
	Summary string `form:"summary" json:"summary" xml:"summary" uri:"summary" binding:"required"` // 回调摘要
}

PayPartnerTransactionsJsapiNotifyGinRequest JSAPI下单 - 回调通知 - 请求参数

type PayPartnerTransactionsJsapiNotifyGinResponse added in v1.0.52

type PayPartnerTransactionsJsapiNotifyGinResponse struct {
	SpAppid        string `json:"sp_appid"`            // 服务商应用ID
	SpMchid        string `json:"sp_mchid"`            // 服务商户号
	SubAppid       string `json:"sub_appid,omitempty"` // 子商户应用ID
	SubMchid       string `json:"sub_mchid"`           // 子商户号
	OutTradeNo     string `json:"out_trade_no"`        // 商户订单号
	TransactionId  string `json:"transaction_id"`      // 微信支付订单号
	TradeType      string `json:"trade_type"`          // 交易类型
	TradeState     string `json:"trade_state"`         // 交易状态
	TradeStateDesc string `json:"trade_state_desc"`    // 交易状态描述
	BankType       string `json:"bank_type"`           // 付款银行
	Attach         string `json:"attach,omitempty"`    // 附加数据
	SuccessTime    string `json:"success_time"`        // 支付完成时间
	Payer          struct {
		Openid    string `json:"openid"`               // 用户服务标识
		SpOpenid  string `json:"sp_openid,omitempty"`  // 用户服务标识
		SubOpenid string `json:"sub_openid,omitempty"` // 用户子标识
	} `json:"payer"` // -支付者
	Amount struct {
		Total         int    `json:"total"`          // 总金额
		PayerTotal    int    `json:"payer_total"`    // 用户支付金额
		Currency      string `json:"currency"`       // 货币类型
		PayerCurrency string `json:"payer_currency"` // 用户支付币种
	} `json:"amount"` // 订单金额
	SceneInfo struct {
		DeviceId string `json:"device_id,omitempty"` //商户端设备号
	} `json:"scene_info,omitempty"` // 场景信息
	PromotionDetail []struct {
		CouponId            string `json:"coupon_id"`                      // 券ID
		Name                string `json:"name,omitempty"`                 // 优惠名称
		Scope               string `json:"scope,omitempty"`                // 优惠范围
		Type                string `json:"type,omitempty"`                 // 优惠类型
		Amount              int    `json:"amount"`                         // 优惠券面额
		StockId             string `json:"stock_id,omitempty"`             // 活动ID
		WechatpayContribute int    `json:"wechatpay_contribute,omitempty"` // 微信出资
		MerchantContribute  int    `json:"merchant_contribute,omitempty"`  // 商户出资
		OtherContribute     int    `json:"other_contribute,omitempty"`     // 其他出资
		Currency            string `json:"currency,omitempty"`             // 优惠币种
		GoodsDetail         []struct {
			GoodsId        string `json:"goods_id"`               // 商品编码
			Quantity       int    `json:"quantity"`               // 商品数量
			UnitPrice      int    `json:"unit_price"`             // 商品单价
			DiscountAmount int    `json:"discount_amount"`        // 商品优惠金额
			GoodsRemark    string `json:"goods_remark,omitempty"` // 商品备注
		} `json:"goods_detail,omitempty"` // 单品列表
	} `json:"promotion_detail,omitempty"` // 优惠功能
}

PayPartnerTransactionsJsapiNotifyGinResponse JSAPI下单 - 回调通知 - 解密后数据

type PayPartnerTransactionsJsapiResponse

type PayPartnerTransactionsJsapiResponse struct {
	PrepayId string `json:"prepay_id"`
}

type PayPartnerTransactionsJsapiResult

type PayPartnerTransactionsJsapiResult struct {
	Result   PayPartnerTransactionsJsapiResponse // 结果
	Body     []byte                              // 内容
	Http     gorequest.Response                  // 请求
	Err      error                               // 错误
	ApiError ApiError                            // 接口错误
}

type PayPartnerTransactionsNativePostNotifyGinRequest added in v1.0.88

type PayPartnerTransactionsNativePostNotifyGinRequest struct {
	Id           string `form:"id" json:"status" xml:"id" uri:"id" binding:"required"`                                         // 通知ID
	CreateTime   string `form:"create_time" json:"create_time" xml:"create_time" uri:"create_time" binding:"required"`         // 通知创建时间
	EventType    string `form:"event_type" json:"event_type" xml:"event_type" uri:"event_type" binding:"required"`             // 通知类型
	ResourceType string `form:"resource_type" json:"resource_type" xml:"resource_type" uri:"resource_type" binding:"required"` // 通知数据类型
	Resource     struct {
		Algorithm      string `form:"algorithm" json:"algorithm" xml:"algorithm" uri:"algorithm" binding:"required"`                          // 加密算法类型
		Ciphertext     string `form:"ciphertext" json:"ciphertext" xml:"ciphertext" uri:"ciphertext" binding:"required"`                      // 数据密文
		AssociatedData string `form:"associated_data" json:"associated_data" xml:"associated_data" uri:"associated_data" binding:"omitempty"` // 附加数据
		OriginalType   string `form:"original_type" json:"original_type" xml:"original_type" uri:"original_type" binding:"required"`          // 原始类型
		Nonce          string `form:"nonce" json:"nonce" xml:"nonce" uri:"nonce" binding:"required"`                                          // 随机串
	} `form:"resource" json:"resource" xml:"resource" uri:"resource" binding:"required"` // 通知数据
	Summary string `form:"summary" json:"summary" xml:"summary" uri:"summary" binding:"required"` // 回调摘要
}

PayPartnerTransactionsNativePostNotifyGinRequest 支付通知API - 请求参数

type PayPartnerTransactionsNativePostNotifyGinResponse added in v1.0.88

type PayPartnerTransactionsNativePostNotifyGinResponse struct {
	SpAppid        string    `json:"sp_appid"`         // 服务商应用ID
	SpMchid        string    `json:"sp_mchid"`         // 服务商户号
	SubAppid       string    `json:"sub_appid"`        // 子商户应用ID
	SubMchid       string    `json:"sub_mchid"`        // 子商户号
	OutTradeNo     string    `json:"out_trade_no"`     // 商户订单号
	TradeStateDesc string    `json:"trade_state_desc"` // 交易状态描述
	TradeType      string    `json:"trade_type"`       // 交易类型
	Attach         string    `json:"attach"`           // 附加数据
	TransactionId  string    `json:"transaction_id"`   // 微信支付订单号
	TradeState     string    `json:"trade_state"`      // 交易状态
	BankType       string    `json:"bank_type"`        // 付款银行
	SuccessTime    time.Time `json:"success_time"`     // 支付完成时间
	Amount         struct {
		Total         int    `json:"total"`          // 总金额
		PayerTotal    int    `json:"payer_total"`    // 用户支付金额
		Currency      string `json:"currency"`       // 货币类型
		PayerCurrency string `json:"payer_currency"` // 用户支付币种
	} `json:"amount"` // 订单金额
	Payer struct {
		SpOpenid  string `json:"sp_openid"`  // 用户服务标识
		SubOpenid string `json:"sub_openid"` // 用户子标识
	} `json:"payer"` // 支付者
	SceneInfo struct {
		DeviceId string `json:"device_id"` // 商户端设备号
	} `json:"scene_info"` // 场景信息
}

PayPartnerTransactionsNativePostNotifyGinResponse 支付通知API - 解密后数据

type PayPartnerTransactionsNativePostResponse added in v1.0.88

type PayPartnerTransactionsNativePostResponse struct {
	CodeUrl string `json:"code_url"` // 二维码链接
}

type PayPartnerTransactionsNativePostResult added in v1.0.88

type PayPartnerTransactionsNativePostResult struct {
	Result   PayPartnerTransactionsNativePostResponse // 结果
	Body     []byte                                   // 内容
	Http     gorequest.Response                       // 请求
	Err      error                                    // 错误
	ApiError ApiError                                 // 接口错误
}

type PayPartnerTransactionsOutTradeNoCloseResult

type PayPartnerTransactionsOutTradeNoCloseResult struct {
	Body []byte             // 内容
	Http gorequest.Response // 请求
	Err  error              // 错误
}

type PayPartnerTransactionsOutTradeNoOutTradeNoClosePostResult added in v1.0.88

type PayPartnerTransactionsOutTradeNoOutTradeNoClosePostResult struct {
	Body     []byte             // 内容
	Http     gorequest.Response // 请求
	Err      error              // 错误
	ApiError ApiError           // 接口错误
}

type PayPartnerTransactionsOutTradeNoOutTradeNoGetResponse added in v1.0.89

type PayPartnerTransactionsOutTradeNoOutTradeNoGetResponse struct {
	SpAppid        string    `json:"sp_appid"`         // 服务商应用ID
	SpMchid        string    `json:"sp_mchid"`         // 服务商户号
	SubAppid       string    `json:"sub_appid"`        // 子商户应用ID
	SubMchid       string    `json:"sub_mchid"`        // 子商户号
	OutTradeNo     string    `json:"out_trade_no"`     // 商户订单号
	TransactionId  string    `json:"transaction_id"`   // 微信支付订单号
	TradeType      string    `json:"trade_type"`       // 交易类型
	TradeState     string    `json:"trade_state"`      // 交易状态
	TradeStateDesc string    `json:"trade_state_desc"` // 交易状态描述
	BankType       string    `json:"bank_type"`        // 付款银行
	Attach         string    `json:"attach"`           // 附加数据
	SuccessTime    time.Time `json:"success_time"`     // 支付完成时间
	Payer          struct {
		SpOpenid  string `json:"sp_openid"`  // 用户服务标识
		SubOpenid string `json:"sub_openid"` // 用户子标识
	} `json:"payer"` // 支付者
	Amount struct {
		Total         int    `json:"total"`          // 总金额
		PayerTotal    int    `json:"payer_total"`    // 用户支付金额
		Currency      string `json:"currency"`       // 货币类型
		PayerCurrency string `json:"payer_currency"` // 用户支付币种
	} `json:"amount"` // 订单金额
	SceneInfo struct {
		DeviceId string `json:"device_id"` // 商户端设备号
	} `json:"scene_info"` // 场景信息
}

type PayPartnerTransactionsOutTradeNoOutTradeNoGetResult added in v1.0.89

type PayPartnerTransactionsOutTradeNoOutTradeNoGetResult struct {
	Result   PayPartnerTransactionsOutTradeNoOutTradeNoGetResponse // 结果
	Body     []byte                                                // 内容
	Http     gorequest.Response                                    // 请求
	Err      error                                                 // 错误
	ApiError ApiError                                              // 接口错误
}

type PayPartnerTransactionsOutTradeNoResponse

type PayPartnerTransactionsOutTradeNoResponse struct {
	SpAppid        string `json:"sp_appid"`         // 服务商应用ID
	SpMchid        string `json:"sp_mchid"`         // 服务商户号
	SubAppid       string `json:"sub_appid"`        // 子商户应用ID
	SubMchid       string `json:"sub_mchid"`        // 子商户号
	OutTradeNo     string `json:"out_trade_no"`     // 商户订单号
	TransactionId  string `json:"transaction_id"`   // 微信支付订单号
	TradeType      string `json:"trade_type"`       // 交易类型
	TradeState     string `json:"trade_state"`      // 交易状态
	TradeStateDesc string `json:"trade_state_desc"` // 交易状态描述
	BankType       string `json:"bank_type"`        // 付款银行
	Attach         string `json:"attach"`           // 附加数据
	SuccessTime    string `json:"success_time"`     // 支付完成时间
	Payer          struct {
		SpOpenid  string `json:"sp_openid"`  // 用户服务标识
		SubOpenid string `json:"sub_openid"` // 用户子标识
	} `json:"payer"` // 支付者
	Amount struct {
		Total         int    `json:"total"`          // 总金额
		PayerTotal    int    `json:"payer_total"`    // 用户支付金额
		Currency      string `json:"currency"`       // 货币类型
		PayerCurrency string `json:"payer_currency"` // 用户支付币种
	} `json:"amount"` // 订单金额
	SceneInfo struct {
		DeviceId string `json:"device_id"` // 商户端设备号
	} `json:"scene_info"` // 场景信息
	PromotionDetail []struct {
		CouponId            string `json:"coupon_id"`            // 券ID
		Name                string `json:"name"`                 // 优惠名称
		Scope               string `json:"scope"`                // 优惠范围
		Type                string `json:"type"`                 // 优惠类型
		Amount              int    `json:"amount"`               // 优惠券面额
		StockId             string `json:"stock_id"`             // 活动ID
		WechatpayContribute int    `json:"wechatpay_contribute"` // 微信出资
		MerchantContribute  int    `json:"merchant_contribute"`  // 商户出资
		OtherContribute     int    `json:"other_contribute"`     // 其他出资
		Currency            string `json:"currency"`             // 优惠币种
		GoodsDetail         []struct {
			GoodsId        string `json:"goods_id"`        // 商品编码
			Quantity       int    `json:"quantity"`        // 商品数量
			UnitPrice      int    `json:"unit_price"`      // 商品单价
			DiscountAmount int    `json:"discount_amount"` // 商品优惠金额
			GoodsRemark    string `json:"goods_remark"`    // 商品备注
		} `json:"goods_detail"` // 单品列表
	} `json:"promotion_detail"` // 优惠功能
}

type PayPartnerTransactionsOutTradeNoResult

type PayPartnerTransactionsOutTradeNoResult struct {
	Result   PayPartnerTransactionsOutTradeNoResponse // 结果
	Body     []byte                                   // 内容
	Http     gorequest.Response                       // 请求
	Err      error                                    // 错误
	ApiError ApiError                                 // 接口错误
}

type ProfitSharingMerchantConfigsResponse added in v1.0.52

type ProfitSharingMerchantConfigsResponse struct {
	SubMchid string `json:"sub_mchid"` // 子商户号
	MaxRatio int    `json:"max_ratio"` // 最大分账比例
}

type ProfitSharingMerchantConfigsResult added in v1.0.52

type ProfitSharingMerchantConfigsResult struct {
	Result   ProfitSharingMerchantConfigsResponse // 结果
	Body     []byte                               // 内容
	Http     gorequest.Response                   // 请求
	Err      error                                // 错误
	ApiError ApiError                             // 接口错误
}

type ProfitSharingOrdersOutOrderNoResponse added in v1.0.52

type ProfitSharingOrdersOutOrderNoResponse struct {
	SubMchid      string `json:"sub_mchid"`      // 子商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	OutOrderNo    string `json:"out_order_no"`   // 商户分账单号
	OrderId       string `json:"order_id"`       // 微信分账单号
	State         string `json:"state"`          // 分账单状态
	Receivers     []struct {
		Amount      int    `json:"amount"`      // 分账金额
		Description string `json:"description"` // 分账描述
		Type        string `json:"type"`        // 分账接收方类型
		Account     string `json:"account"`     // 分账接收方账号
		Result      string `json:"result"`      // 分账结果
		FailReason  string `json:"fail_reason"` // 分账失败原因
		DetailId    string `json:"detail_id"`   // 分账明细单号
		CreateTime  string `json:"create_time"` // 分账创建时间
		FinishTime  string `json:"finish_time"` // 分账完成时间
	} `json:"receivers,omitempty"` // 分账接收方列表
}

type ProfitSharingOrdersOutOrderNoResult added in v1.0.52

type ProfitSharingOrdersOutOrderNoResult struct {
	Result   ProfitSharingOrdersOutOrderNoResponse // 结果
	Body     []byte                                // 内容
	Http     gorequest.Response                    // 请求
	Err      error                                 // 错误
	ApiError ApiError                              // 接口错误
}

type ProfitSharingOrdersResponse added in v1.0.52

type ProfitSharingOrdersResponse struct {
	SubMchid      string `json:"sub_mchid"`      // 子商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	OutOrderNo    string `json:"out_order_no"`   // 商户分账单号
	OrderId       string `json:"order_id"`       // 微信分账单号
	State         string `json:"state"`          // 分账单状态
	Receivers     []struct {
		Amount      int    `json:"amount"`      // 分账金额
		Description string `json:"description"` // 分账描述
		Type        string `json:"type"`        // 分账接收方类型
		Account     string `json:"account"`     // 分账接收方账号
		Result      string `json:"result"`      // 分账结果
		FailReason  string `json:"fail_reason"` // 分账失败原因
		DetailId    string `json:"detail_id"`   // 分账明细单号
		CreateTime  string `json:"create_time"` // 分账创建时间
		FinishTime  string `json:"finish_time"` // 分账完成时间
	} `json:"receivers,omitempty"` // 分账接收方列表
}

type ProfitSharingOrdersResult added in v1.0.52

type ProfitSharingOrdersResult struct {
	Result   ProfitSharingOrdersResponse // 结果
	Body     []byte                      // 内容
	Http     gorequest.Response          // 请求
	Err      error                       // 错误
	ApiError ApiError                    // 接口错误
}

type ProfitSharingOrdersUnfreezeResponse added in v1.0.52

type ProfitSharingOrdersUnfreezeResponse struct {
	SubMchid      string `json:"sub_mchid"`      // 子商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	OutOrderNo    string `json:"out_order_no"`   // 商户分账单号
	OrderId       string `json:"order_id"`       // 微信分账单号
	State         string `json:"state"`          // 分账单状态
	Receivers     []struct {
		Amount      int    `json:"amount"`      // 分账金额
		Description string `json:"description"` // 分账描述
		Type        string `json:"type"`        // 分账接收方类型
		Account     string `json:"account"`     // 分账接收方账号
		Result      string `json:"result"`      // 分账结果
		FailReason  string `json:"fail_reason"` // 分账失败原因
		DetailId    string `json:"detail_id"`   // 分账明细单号
		CreateTime  string `json:"create_time"` // 分账创建时间
		FinishTime  string `json:"finish_time"` // 分账完成时间
	} `json:"receivers,omitempty"` // 分账接收方列表
}

type ProfitSharingOrdersUnfreezeResult added in v1.0.52

type ProfitSharingOrdersUnfreezeResult struct {
	Result   ProfitSharingOrdersUnfreezeResponse // 结果
	Body     []byte                              // 内容
	Http     gorequest.Response                  // 请求
	Err      error                               // 错误
	ApiError ApiError                            // 接口错误
}

type ProfitSharingReceiversAddResponse added in v1.0.52

type ProfitSharingReceiversAddResponse struct {
	SubMchid       string `json:"sub_mchid"`                 // 子商户号
	Type           string `json:"type"`                      // 分账接收方类型
	Account        string `json:"account"`                   // 分账接收方账号
	Name           string `json:"name,omitempty"`            // 分账接收方全称
	RelationType   string `json:"relation_type"`             // 与分账方的关系类型
	CustomRelation string `json:"custom_relation,omitempty"` // 自定义的分账关系
}

type ProfitSharingReceiversAddResult added in v1.0.52

type ProfitSharingReceiversAddResult struct {
	Result   ProfitSharingReceiversAddResponse // 结果
	Body     []byte                            // 内容
	Http     gorequest.Response                // 请求
	Err      error                             // 错误
	ApiError ApiError                          // 接口错误
}

type ProfitSharingReceiversDeleteResponse added in v1.0.52

type ProfitSharingReceiversDeleteResponse struct {
	SubMchid string `json:"sub_mchid"` // 子商户号
	Type     string `json:"type"`      // 分账接收方类型
	Account  string `json:"account"`   // 分账接收方账号
}

type ProfitSharingReceiversDeleteResult added in v1.0.52

type ProfitSharingReceiversDeleteResult struct {
	Result   ProfitSharingReceiversDeleteResponse // 结果
	Body     []byte                               // 内容
	Http     gorequest.Response                   // 请求
	Err      error                                // 错误
	ApiError ApiError                             // 接口错误
}

type ProfitSharingReceiversNotifyGinRequest added in v1.0.52

type ProfitSharingReceiversNotifyGinRequest struct {
	Id           string `form:"id" json:"status" xml:"id" uri:"id" binding:"required"`                                         // 通知ID
	CreateTime   string `form:"create_time" json:"create_time" xml:"create_time" uri:"create_time" binding:"required"`         // 通知创建时间
	EventType    string `form:"event_type" json:"event_type" xml:"event_type" uri:"event_type" binding:"required"`             // 通知类型
	Summary      string `form:"summary" json:"summary" xml:"summary" uri:"summary" binding:"required"`                         // 通知简要说明
	ResourceType string `form:"resource_type" json:"resource_type" xml:"resource_type" uri:"resource_type" binding:"required"` // 通知数据类型
	Resource     struct {
		Algorithm      string `form:"algorithm" json:"algorithm" xml:"algorithm" uri:"algorithm" binding:"required"`                          // 加密算法类型
		Ciphertext     string `form:"ciphertext" json:"ciphertext" xml:"ciphertext" uri:"ciphertext" binding:"required"`                      // 数据密文
		AssociatedData string `form:"associated_data" json:"associated_data" xml:"associated_data" uri:"associated_data" binding:"omitempty"` // 附加数据
		OriginalType   string `form:"original_type" json:"original_type" xml:"original_type" uri:"original_type" binding:"required"`          // 原始类型
		Nonce          string `form:"nonce" json:"nonce" xml:"nonce" uri:"nonce" binding:"required"`                                          // 随机串
	} `form:"resource" json:"resource" xml:"resource" uri:"resource" binding:"required"` // 通知数据
}

ProfitSharingReceiversNotifyGinRequest 分账动账通知API - 回调通知 - 请求参数

type ProfitSharingReceiversNotifyGinResponse added in v1.0.52

type ProfitSharingReceiversNotifyGinResponse struct {
	SpMchid       string `json:"sp_mchid"`       // 服务商商户号
	SubMchid      string `json:"sub_mchid"`      // 子商户号
	TransactionId string `json:"transaction_id"` // 微信订单号
	OrderId       string `json:"order_id"`       // 微信分账/回退单号
	OutOrderNo    string `json:"out_order_no"`   // 商户分账/回退单号
	Receiver      struct {
		Type        string `json:"type"`        // 分账接收方类型
		Account     string `json:"account"`     // 分账接收方账号
		Amount      int    `json:"amount"`      // 分账动账金额
		Description string `json:"description"` // 分账/回退描述
	} `json:"receiver"` // 分账接收方列表
	SuccessTime string `json:"success_time"` // 成功时间
}

ProfitSharingReceiversNotifyGinResponse 分账动账通知API - 回调通知 - 解密后数据

type ProfitSharingReturnOrdersOutReturnNoResponse added in v1.0.52

type ProfitSharingReturnOrdersOutReturnNoResponse struct {
	SubMchid    string `json:"sub_mchid"`     // 子商户号
	OrderId     string `json:"order_id"`      // 微信分账单号
	OutOrderNo  string `json:"out_order_no"`  // 商户分账单号
	OutReturnNo string `json:"out_return_no"` // 商户回退单号
	ReturnId    string `json:"return_id"`     // 微信回退单号
	ReturnMchid string `json:"return_mchid"`  // 回退商户号
	Amount      int    `json:"amount"`        // 回退金额
	Description string `json:"description"`   // 回退描述
	Result      string `json:"result"`        // 回退结果
	FailReason  string `json:"fail_reason"`   // 失败原因
	CreateTime  string `json:"create_time"`   // 创建时间
	FinishTime  string `json:"finish_time"`   // 完成时间
}

type ProfitSharingReturnOrdersOutReturnNoResult added in v1.0.52

type ProfitSharingReturnOrdersOutReturnNoResult struct {
	Result   ProfitSharingReturnOrdersOutReturnNoResponse // 结果
	Body     []byte                                       // 内容
	Http     gorequest.Response                           // 请求
	Err      error                                        // 错误
	ApiError ApiError                                     // 接口错误
}

type ProfitSharingReturnOrdersResponse added in v1.0.52

type ProfitSharingReturnOrdersResponse struct {
	SubMchid    string `json:"sub_mchid"`     // 子商户号
	OrderId     string `json:"order_id"`      // 微信分账单号
	OutOrderNo  string `json:"out_order_no"`  // 商户分账单号
	OutReturnNo string `json:"out_return_no"` // 商户回退单号
	ReturnId    string `json:"return_id"`     // 微信回退单号
	ReturnMchid string `json:"return_mchid"`  // 回退商户号
	Amount      int    `json:"amount"`        // 回退金额
	Description string `json:"description"`   // 回退描述
	Result      string `json:"result"`        // 回退结果
	FailReason  string `json:"fail_reason"`   // 失败原因
	CreateTime  string `json:"create_time"`   // 创建时间
	FinishTime  string `json:"finish_time"`   // 完成时间
}

type ProfitSharingReturnOrdersResult added in v1.0.52

type ProfitSharingReturnOrdersResult struct {
	Result   ProfitSharingReturnOrdersResponse // 结果
	Body     []byte                            // 内容
	Http     gorequest.Response                // 请求
	Err      error                             // 错误
	ApiError ApiError                          // 接口错误
}

type ProfitSharingTransactionsAmountsResponse added in v1.0.52

type ProfitSharingTransactionsAmountsResponse struct {
	TransactionId string `json:"transaction_id"` // 微信订单号
	UnsplitAmount int    `json:"unsplit_amount"` // 订单剩余待分金额
}

type ProfitSharingTransactionsAmountsResult added in v1.0.52

type ProfitSharingTransactionsAmountsResult struct {
	Result   ProfitSharingTransactionsAmountsResponse // 结果
	Body     []byte                                   // 内容
	Http     gorequest.Response                       // 请求
	Err      error                                    // 错误
	ApiError ApiError                                 // 接口错误
}

type RefundDomesticRefundsNoNotifyGinRequest added in v1.0.52

type RefundDomesticRefundsNoNotifyGinRequest struct {
	Id           string `form:"id" json:"status" xml:"id" uri:"id" binding:"required"`                                         // 通知ID
	CreateTime   string `form:"create_time" json:"create_time" xml:"create_time" uri:"create_time" binding:"required"`         // 通知创建时间
	EventType    string `form:"event_type" json:"event_type" xml:"event_type" uri:"event_type" binding:"required"`             // 通知类型
	Summary      string `form:"summary" json:"summary" xml:"summary" uri:"summary" binding:"required"`                         // 通知简要说明
	ResourceType string `form:"resource_type" json:"resource_type" xml:"resource_type" uri:"resource_type" binding:"required"` // 通知数据类型
	Resource     struct {
		Algorithm      string `form:"algorithm" json:"algorithm" xml:"algorithm" uri:"algorithm" binding:"required"`                          // 加密算法类型
		Ciphertext     string `form:"ciphertext" json:"ciphertext" xml:"ciphertext" uri:"ciphertext" binding:"required"`                      // 数据密文
		AssociatedData string `form:"associated_data" json:"associated_data" xml:"associated_data" uri:"associated_data" binding:"omitempty"` // 附加数据
		OriginalType   string `form:"original_type" json:"original_type" xml:"original_type" uri:"original_type" binding:"required"`          // 原始类型
		Nonce          string `form:"nonce" json:"nonce" xml:"nonce" uri:"nonce" binding:"required"`                                          // 随机串
	} `form:"resource" json:"resource" xml:"resource" uri:"resource" binding:"required"` // 通知数据
}

RefundDomesticRefundsNoNotifyGinRequest 申请退款API - 回调通知 - 请求参数

type RefundDomesticRefundsNoNotifyGinResponse added in v1.0.52

type RefundDomesticRefundsNoNotifyGinResponse struct {
	SpMchid             string `json:"sp_mchid"`              // 服务商户号
	SubMchid            string `json:"sub_mchid"`             // 子商户号
	OutTradeNo          string `json:"out_trade_no"`          // 商户订单号
	TransactionId       string `json:"transaction_id"`        // 微信支付订单号
	OutRefundNo         string `json:"out_refund_no"`         // 商户退款单号
	RefundId            string `json:"refund_id"`             // 微信支付退款单号
	RefundStatus        string `json:"refund_status"`         // 退款状态
	SuccessTime         string `json:"success_time"`          // 退款成功时间
	UserReceivedAccount string `json:"user_received_account"` // 退款入账账户
	Amount              struct {
		Total       int `json:"total"`        // 订单金额
		Refund      int `json:"refund"`       // 退款金额
		PayerTotal  int `json:"payer_total"`  // 用户支付金额
		PayerRefund int `json:"payer_refund"` // 用户退款金额
	} `json:"amount"` // 金额信息
}

RefundDomesticRefundsNoNotifyGinResponse 申请退款API - 回调通知 - 解密后数据

type RefundDomesticRefundsOutRefundNoGetResponse added in v1.0.88

type RefundDomesticRefundsOutRefundNoGetResponse struct {
	RefundId            string    `json:"refund_id"`             // 微信支付退款单号
	OutRefundNo         string    `json:"out_refund_no"`         // 商户退款单号
	TransactionId       string    `json:"transaction_id"`        // 微信支付订单号
	OutTradeNo          string    `json:"out_trade_no"`          // 商户订单号
	Channel             string    `json:"channel"`               // 退款渠道
	UserReceivedAccount string    `json:"user_received_account"` // 退款入账账户
	SuccessTime         time.Time `json:"success_time"`          // 退款成功时间
	CreateTime          time.Time `json:"create_time"`           // 退款创建时间
	Status              string    `json:"status"`                // 退款状态
	FundsAccount        string    `json:"funds_account"`         // 资金账户
	Amount              struct {
		Total  int `json:"total"`  // 订单金额
		Refund int `json:"refund"` // 退款金额
		From   []struct {
			Account string `json:"account"` // 出资账户类型
			Amount  int    `json:"amount"`  // 出资金额
		} `json:"from"` // 退款出资账户及金额
		PayerTotal       int    `json:"payer_total"`       // 用户支付金额
		PayerRefund      int    `json:"payer_refund"`      // 用户退款金额
		SettlementRefund int    `json:"settlement_refund"` // 应结退款金额
		SettlementTotal  int    `json:"settlement_total"`  // 应结订单金额
		DiscountRefund   int    `json:"discount_refund"`   // 优惠退款金额
		Currency         string `json:"currency"`          // 退款币种
		RefundFee        int    `json:"refund_fee"`        // 手续费退款金额
	} `json:"amount"` // 金额信息
	PromotionDetail []struct {
		PromotionId  string `json:"promotion_id"`  // 券ID
		Scope        string `json:"scope"`         // 优惠范围
		Type         string `json:"type"`          // 优惠类型
		Amount       int    `json:"amount"`        // 优惠券面额
		RefundAmount int    `json:"refund_amount"` // 优惠退款金额
		GoodsDetail  []struct {
			MerchantGoodsId  string `json:"merchant_goods_id"`  // 商户侧商品编码
			WechatpayGoodsId string `json:"wechatpay_goods_id"` // 微信支付商品编码
			GoodsName        string `json:"goods_name"`         // 商品名称
			UnitPrice        int    `json:"unit_price"`         // 商品单价
			RefundAmount     int    `json:"refund_amount"`      // 商品退款金额
			RefundQuantity   int    `json:"refund_quantity"`    // 商品退货数量
		} `json:"goods_detail"` // 商品列表
	} `json:"promotion_detail"` // 优惠退款信息
}

type RefundDomesticRefundsOutRefundNoGetResult added in v1.0.88

type RefundDomesticRefundsOutRefundNoGetResult struct {
	Result   RefundDomesticRefundsOutRefundNoGetResponse // 结果
	Body     []byte                                      // 内容
	Http     gorequest.Response                          // 请求
	Err      error                                       // 错误
	ApiError ApiError                                    // 接口错误
}

type RefundDomesticRefundsOutRefundNoResponse

type RefundDomesticRefundsOutRefundNoResponse struct {
	RefundId            string    `json:"refund_id"`
	OutRefundNo         string    `json:"out_refund_no"`
	TransactionId       string    `json:"transaction_id"`
	OutTradeNo          string    `json:"out_trade_no"`
	Channel             string    `json:"channel"`
	UserReceivedAccount string    `json:"user_received_account"`
	SuccessTime         string    `json:"success_time"`
	CreateTime          time.Time `json:"create_time"`
	Status              string    `json:"status"`
	FundsAccount        string    `json:"funds_account"`
	Amount              struct {
		Total  int `json:"total"`
		Refund int `json:"refund"`
		From   []struct {
			Account string `json:"account"`
			Amount  int    `json:"amount"`
		} `json:"from"`
		PayerTotal       int    `json:"payer_total"`
		PayerRefund      int    `json:"payer_refund"`
		SettlementRefund int    `json:"settlement_refund"`
		SettlementTotal  int    `json:"settlement_total"`
		DiscountRefund   int    `json:"discount_refund"`
		Currency         string `json:"currency"`
	} `json:"amount"`
	PromotionDetail []struct {
		PromotionId  string `json:"promotion_id"`
		Scope        string `json:"scope"`
		Type         string `json:"type"`
		Amount       int    `json:"amount"`
		RefundAmount int    `json:"refund_amount"`
		GoodsDetail  struct {
			MerchantGoodsId  string `json:"merchant_goods_id"`
			WechatpayGoodsId string `json:"wechatpay_goods_id"`
			GoodsName        string `json:"goods_name"`
			UnitPrice        int    `json:"unit_price"`
			RefundAmount     int    `json:"refund_amount"`
			RefundQuantity   int    `json:"refund_quantity"`
		} `json:"goods_detail"`
	} `json:"promotion_detail"`
}

type RefundDomesticRefundsOutRefundNoResult

type RefundDomesticRefundsOutRefundNoResult struct {
	Result   RefundDomesticRefundsOutRefundNoResponse // 结果
	Body     []byte                                   // 内容
	Http     gorequest.Response                       // 请求
	Err      error                                    // 错误
	ApiError ApiError                                 // 接口错误
}

type RefundDomesticRefundsPostNotifyGinRequest added in v1.0.88

type RefundDomesticRefundsPostNotifyGinRequest struct {
	Id           string `form:"id" json:"status" xml:"id" uri:"id" binding:"required"`                                         // 通知ID
	CreateTime   string `form:"create_time" json:"create_time" xml:"create_time" uri:"create_time" binding:"required"`         // 通知创建时间
	EventType    string `form:"event_type" json:"event_type" xml:"event_type" uri:"event_type" binding:"required"`             // 通知类型
	ResourceType string `form:"resource_type" json:"resource_type" xml:"resource_type" uri:"resource_type" binding:"required"` // 通知数据类型
	Resource     struct {
		Algorithm      string `form:"algorithm" json:"algorithm" xml:"algorithm" uri:"algorithm" binding:"required"`                          // 加密算法类型
		Ciphertext     string `form:"ciphertext" json:"ciphertext" xml:"ciphertext" uri:"ciphertext" binding:"required"`                      // 数据密文
		AssociatedData string `form:"associated_data" json:"associated_data" xml:"associated_data" uri:"associated_data" binding:"omitempty"` // 附加数据
		OriginalType   string `form:"original_type" json:"original_type" xml:"original_type" uri:"original_type" binding:"required"`          // 原始类型
		Nonce          string `form:"nonce" json:"nonce" xml:"nonce" uri:"nonce" binding:"required"`                                          // 随机串
	} `form:"resource" json:"resource" xml:"resource" uri:"resource" binding:"required"` // 通知数据
	Summary string `form:"summary" json:"summary" xml:"summary" uri:"summary" binding:"required"` // 回调摘要
}

RefundDomesticRefundsPostNotifyGinRequest 退款结果通知API - 请求参数

type RefundDomesticRefundsPostNotifyGinResponse added in v1.0.88

type RefundDomesticRefundsPostNotifyGinResponse struct {
	SpMchid             string    `json:"sp_mchid"`              // 服务商户号
	SubMchid            string    `json:"sub_mchid"`             // 子商户号
	TransactionId       string    `json:"transaction_id"`        // 商户订单号
	OutTradeNo          string    `json:"out_trade_no"`          // 微信支付订单号
	RefundId            string    `json:"refund_id"`             // 商户退款单号
	OutRefundNo         string    `json:"out_refund_no"`         // 微信支付退款单号
	RefundStatus        string    `json:"refund_status"`         // 退款状态
	SuccessTime         time.Time `json:"success_time"`          // 退款成功时间
	UserReceivedAccount string    `json:"user_received_account"` // 退款入账账户
	Amount              struct {
		Total       int `json:"total"`        // 订单金额
		Refund      int `json:"refund"`       // 退款金额
		PayerTotal  int `json:"payer_total"`  // 用户支付金额
		PayerRefund int `json:"payer_refund"` // 用户退款金额
	} `json:"amount"` // 金额信息
}

RefundDomesticRefundsPostNotifyGinResponse 退款结果通知API - 解密后数据

type RefundDomesticRefundsPostResponse added in v1.0.88

type RefundDomesticRefundsPostResponse struct {
	RefundId            string    `json:"refund_id"`             // 微信支付退款单号
	OutRefundNo         string    `json:"out_refund_no"`         // 商户退款单号
	TransactionId       string    `json:"transaction_id"`        // 微信支付订单号
	OutTradeNo          string    `json:"out_trade_no"`          // 商户订单号
	Channel             string    `json:"channel"`               // 退款渠道
	UserReceivedAccount string    `json:"user_received_account"` // 退款入账账户
	SuccessTime         time.Time `json:"success_time"`          // 退款成功时间
	CreateTime          time.Time `json:"create_time"`           // 退款创建时间
	Status              string    `json:"status"`                // 退款状态
	FundsAccount        string    `json:"funds_account"`         // 资金账户
	Amount              struct {
		Total  int `json:"total"`  // 订单金额
		Refund int `json:"refund"` // 退款金额
		From   []struct {
			Account string `json:"account"` // 出资账户类型
			Amount  int    `json:"amount"`  // 出资金额
		} `json:"from"` // 退款出资账户及金额
		PayerTotal       int    `json:"payer_total"`       // 用户支付金额
		PayerRefund      int    `json:"payer_refund"`      // 用户退款金额
		SettlementRefund int    `json:"settlement_refund"` // 应结退款金额
		SettlementTotal  int    `json:"settlement_total"`  // 应结订单金额
		DiscountRefund   int    `json:"discount_refund"`   // 优惠退款金额
		Currency         string `json:"currency"`          // 退款币种
		RefundFee        int    `json:"refund_fee"`        // 手续费退款金额
	} `json:"amount"` // 金额信息
	PromotionDetail []struct {
		PromotionId  string `json:"promotion_id"`  // 券ID
		Scope        string `json:"scope"`         // 优惠范围
		Type         string `json:"type"`          // 优惠类型
		Amount       int    `json:"amount"`        // 优惠券面额
		RefundAmount int    `json:"refund_amount"` // 优惠退款金额
		GoodsDetail  []struct {
			MerchantGoodsId  string `json:"merchant_goods_id"`  // 商户侧商品编码
			WechatpayGoodsId string `json:"wechatpay_goods_id"` // 微信支付商品编码
			GoodsName        string `json:"goods_name"`         // 商品名称
			UnitPrice        int    `json:"unit_price"`         // 商品单价
			RefundAmount     int    `json:"refund_amount"`      // 商品退款金额
			RefundQuantity   int    `json:"refund_quantity"`    // 商品退货数量
		} `json:"goods_detail"` // 商品列表
	} `json:"promotion_detail"` // 优惠退款信息
}

type RefundDomesticRefundsPostResult added in v1.0.88

type RefundDomesticRefundsPostResult struct {
	Result   RefundDomesticRefundsPostResponse // 结果
	Body     []byte                            // 内容
	Http     gorequest.Response                // 请求
	Err      error                             // 错误
	ApiError ApiError                          // 接口错误
}

type RefundDomesticRefundsResponse

type RefundDomesticRefundsResponse struct {
	RefundId            string    `json:"refund_id"`
	OutRefundNo         string    `json:"out_refund_no"`
	TransactionId       string    `json:"transaction_id"`
	OutTradeNo          string    `json:"out_trade_no"`
	Channel             string    `json:"channel"`
	UserReceivedAccount string    `json:"user_received_account"`
	SuccessTime         time.Time `json:"success_time"`
	CreateTime          time.Time `json:"create_time"`
	Status              string    `json:"status"`
	FundsAccount        string    `json:"funds_account"`
	Amount              struct {
		Total  int `json:"total"`
		Refund int `json:"refund"`
		From   []struct {
			Account string `json:"account"`
			Amount  int    `json:"amount"`
		} `json:"from"`
		PayerTotal       int    `json:"payer_total"`
		PayerRefund      int    `json:"payer_refund"`
		SettlementRefund int    `json:"settlement_refund"`
		SettlementTotal  int    `json:"settlement_total"`
		DiscountRefund   int    `json:"discount_refund"`
		Currency         string `json:"currency"`
	} `json:"amount"`
	PromotionDetail []struct {
		PromotionId  string `json:"promotion_id"`
		Scope        string `json:"scope"`
		Type         string `json:"type"`
		Amount       int    `json:"amount"`
		RefundAmount int    `json:"refund_amount"`
		GoodsDetail  struct {
			MerchantGoodsId  string `json:"merchant_goods_id"`
			WechatpayGoodsId string `json:"wechatpay_goods_id"`
			GoodsName        string `json:"goods_name"`
			UnitPrice        int    `json:"unit_price"`
			RefundAmount     int    `json:"refund_amount"`
			RefundQuantity   int    `json:"refund_quantity"`
		} `json:"goods_detail"`
	} `json:"promotion_detail"`
}

type RefundDomesticRefundsResult

type RefundDomesticRefundsResult struct {
	Result   RefundDomesticRefundsResponse // 结果
	Body     []byte                        // 内容
	Http     gorequest.Response            // 请求
	Err      error                         // 错误
	ApiError ApiError                      // 接口错误
}

Jump to

Keyboard shortcuts

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