Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
- func (c *Client) ConfigApp(appId, appSecret string) *Client
- func (c *Client) GetAesKey() string
- func (c *Client) GetApiV3() string
- func (c *Client) GetAppId() string
- func (c *Client) GetAppSecret() string
- func (c *Client) GetJsApi(ctx context.Context, param GetJsApi) (result GetJsApiResult, err error)
- func (c *Client) GetLog() *golog.ApiClient
- func (c *Client) GetMchId() string
- func (c *Client) GetMchSslKey() string
- func (c *Client) GetMchSslSerialNo() string
- func (c *Client) MerchantServiceComplaintsV2(ctx context.Context, notMustParams ...gorequest.Params) *MerchantServiceComplaintsV2Result
- func (c *Client) PayTransactionsId(ctx context.Context, transactionId string) *PayTransactionsIdResult
- func (c *Client) PayTransactionsJsapi(ctx context.Context, notMustParams ...gorequest.Params) *PayTransactionsJsapiResult
- func (c *Client) PayTransactionsJsapiNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson PayTransactionsJsapiNotifyGinRequest, ...)
- func (c *Client) PayTransactionsOutTradeNo(ctx context.Context, outTradeNo string) *PayTransactionsOutTradeNoResult
- func (c *Client) PayTransactionsOutTradeNoClose(ctx context.Context, OutTradeNo string) *PayTransactionsOutTradeNoCloseResult
- func (c *Client) RefundDomesticRefunds(ctx context.Context, notMustParams ...gorequest.Params) *RefundDomesticRefundsResult
- func (c *Client) RefundDomesticRefundsNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson RefundDomesticRefundsNotifyGinRequest, ...)
- func (c *Client) RefundDomesticRefundsOutRefundNo(ctx context.Context, outRefundNo string) *RefundDomesticRefundsOutRefundNoResult
- func (c *Client) SignDecrypt(aesKey, associatedData, nonce, ciphertext string) ([]byte, error)
- func (c *Client) TransferBatches(ctx context.Context, notMustParams ...gorequest.Params) *TransferBatchesResult
- func (c *Client) TransferBatchesBatchId(ctx context.Context, batchId string, needQueryDetail bool, offset, limit int, ...) *TransferBatchesBatchIdResult
- func (c *Client) TransferBatchesBatchIdDetailsDetailId(ctx context.Context, batchId string, detailId string) *TransferBatchesBatchIdDetailsDetailIdResult
- func (c *Client) TransferBatchesOutBatchNo(ctx context.Context, outBatchNo string, needQueryDetail bool, ...) *TransferBatchesOutBatchNoResult
- func (c *Client) TransferBatchesOutBatchNoDetailsOutDetail(ctx context.Context, outBatchNo string, outDetailNo string) *TransferBatchesOutBatchNoDetailsOutDetailResult
- type ClientConfig
- type GetJsApi
- type GetJsApiResult
- type MerchantServiceComplaintsV2Response
- type MerchantServiceComplaintsV2Result
- type PayTransactionsIdResponse
- type PayTransactionsIdResult
- type PayTransactionsJsapiNotifyGinRequest
- type PayTransactionsJsapiNotifyGinResponse
- type PayTransactionsJsapiResponse
- type PayTransactionsJsapiResult
- type PayTransactionsOutTradeNoCloseResult
- type PayTransactionsOutTradeNoResponse
- type PayTransactionsOutTradeNoResult
- type RefundDomesticRefundsNotifyGinRequest
- type RefundDomesticRefundsNotifyGinResponse
- type RefundDomesticRefundsOutRefundNoResponse
- type RefundDomesticRefundsOutRefundNoResult
- type RefundDomesticRefundsResponse
- type RefundDomesticRefundsResult
- type TransferBatchesBatchIdDetailsDetailIdResponse
- type TransferBatchesBatchIdDetailsDetailIdResult
- type TransferBatchesBatchIdResponse
- type TransferBatchesBatchIdResult
- type TransferBatchesOutBatchNoDetailsOutDetailResponse
- type TransferBatchesOutBatchNoDetailsOutDetailResult
- type TransferBatchesOutBatchNoResponse
- type TransferBatchesOutBatchNoResult
- type TransferBatchesResponse
- type TransferBatchesResult
Constants ¶
const (
LogTable = "wechatpayapiv3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v1.0.47
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func NewClient ¶ added in v1.0.47
func NewClient(config *ClientConfig) (*Client, error)
NewClient 创建实例化
func (*Client) ConfigApiClientFun ¶ added in v1.0.52
func (c *Client) ConfigApiClientFun(apiClientFun golog.ApiClientFun)
ConfigApiClientFun 日志配置
func (*Client) GetAppSecret ¶ added in v1.0.52
func (*Client) GetJsApi ¶ added in v1.0.47
GetJsApi JSAPI调起支付API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_4.shtml
func (*Client) GetMchSslKey ¶ added in v1.0.47
func (*Client) GetMchSslSerialNo ¶ added in v1.0.47
func (*Client) MerchantServiceComplaintsV2 ¶ added in v1.0.47
func (c *Client) MerchantServiceComplaintsV2(ctx context.Context, notMustParams ...gorequest.Params) *MerchantServiceComplaintsV2Result
MerchantServiceComplaintsV2 查询投诉单列表API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_11.shtml
func (*Client) PayTransactionsId ¶ added in v1.0.47
func (c *Client) PayTransactionsId(ctx context.Context, transactionId string) *PayTransactionsIdResult
PayTransactionsId 微信支付订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_2.shtml
func (*Client) PayTransactionsJsapi ¶ added in v1.0.47
func (c *Client) PayTransactionsJsapi(ctx context.Context, notMustParams ...gorequest.Params) *PayTransactionsJsapiResult
PayTransactionsJsapi JSAPI下单 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_1.shtml
func (*Client) PayTransactionsJsapiNotifyGin ¶ added in v1.0.52
func (c *Client) PayTransactionsJsapiNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson PayTransactionsJsapiNotifyGinRequest, response PayTransactionsJsapiNotifyGinResponse, gcm []byte, err error)
PayTransactionsJsapiNotifyGin JSAPI下单 - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_1.shtml
func (*Client) PayTransactionsOutTradeNo ¶ added in v1.0.47
func (c *Client) PayTransactionsOutTradeNo(ctx context.Context, outTradeNo string) *PayTransactionsOutTradeNoResult
PayTransactionsOutTradeNo 商户订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_2.shtml
func (*Client) PayTransactionsOutTradeNoClose ¶ added in v1.0.47
func (c *Client) PayTransactionsOutTradeNoClose(ctx context.Context, OutTradeNo string) *PayTransactionsOutTradeNoCloseResult
PayTransactionsOutTradeNoClose 关闭订单API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_3.shtml
func (*Client) RefundDomesticRefunds ¶ added in v1.0.47
func (c *Client) RefundDomesticRefunds(ctx context.Context, notMustParams ...gorequest.Params) *RefundDomesticRefundsResult
RefundDomesticRefunds 申请退款API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter6_1_26.shtml
func (*Client) RefundDomesticRefundsNotifyGin ¶ added in v1.0.52
func (c *Client) RefundDomesticRefundsNotifyGin(ctx context.Context, ginCtx *gin.Context) (validateJson RefundDomesticRefundsNotifyGinRequest, response RefundDomesticRefundsNotifyGinResponse, gcm []byte, err error)
RefundDomesticRefundsNotifyGin 申请退款API - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter6_1_26.shtml
func (*Client) RefundDomesticRefundsOutRefundNo ¶ added in v1.0.47
func (c *Client) RefundDomesticRefundsOutRefundNo(ctx context.Context, outRefundNo string) *RefundDomesticRefundsOutRefundNoResult
RefundDomesticRefundsOutRefundNo 查询单笔退款API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_10.shtml
func (*Client) SignDecrypt ¶ added in v1.0.52
func (*Client) TransferBatches ¶ added in v1.0.52
func (c *Client) TransferBatches(ctx context.Context, notMustParams ...gorequest.Params) *TransferBatchesResult
TransferBatches 发起商家转账API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter4_3_1.shtml
func (*Client) TransferBatchesBatchId ¶ added in v1.0.52
func (c *Client) TransferBatchesBatchId(ctx context.Context, batchId string, needQueryDetail bool, offset, limit int, detailStatus string) *TransferBatchesBatchIdResult
TransferBatchesBatchId 微信批次单号查询批次单API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter4_3_2.shtml
func (*Client) TransferBatchesBatchIdDetailsDetailId ¶ added in v1.0.52
func (c *Client) TransferBatchesBatchIdDetailsDetailId(ctx context.Context, batchId string, detailId string) *TransferBatchesBatchIdDetailsDetailIdResult
TransferBatchesBatchIdDetailsDetailId 微信明细单号查询明细单API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter4_3_3.shtml
func (*Client) TransferBatchesOutBatchNo ¶ added in v1.0.52
func (c *Client) TransferBatchesOutBatchNo(ctx context.Context, outBatchNo string, needQueryDetail bool, offset, limit int, detailStatus string) *TransferBatchesOutBatchNoResult
TransferBatchesOutBatchNo 商家批次单号查询批次单API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter4_3_5.shtml
func (*Client) TransferBatchesOutBatchNoDetailsOutDetail ¶ added in v1.0.52
func (c *Client) TransferBatchesOutBatchNoDetailsOutDetail(ctx context.Context, outBatchNo string, outDetailNo string) *TransferBatchesOutBatchNoDetailsOutDetailResult
TransferBatchesOutBatchNoDetailsOutDetail 商家明细单号查询明细单API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter4_3_6.shtml
type ClientConfig ¶ added in v1.0.52
type ClientConfig struct { AppId string // 小程序或者公众号唯一凭证 AppSecret string // 小程序或者公众号唯一凭证密钥 MchId string // 微信支付的商户id AesKey string // 私钥 ApiV3 string // API v3密钥 MchSslSerialNo string // pem 证书号 MchSslKey string // pem key 内容 }
ClientConfig 实例配置
type GetJsApiResult ¶
type GetJsApiResult struct { AppId string // 应用ID TimeStamp string // 时间戳 NonceStr string // 随机字符串 Package string // 订单详情扩展字符串 SignType string // 签名方式 PaySign string // 签名 }
GetJsApiResult 返回参数
type MerchantServiceComplaintsV2Response ¶ added in v1.0.47
type MerchantServiceComplaintsV2Response 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 MerchantServiceComplaintsV2Result ¶ added in v1.0.47
type MerchantServiceComplaintsV2Result struct { Result MerchantServiceComplaintsV2Response // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type PayTransactionsIdResponse ¶ added in v1.0.44
type PayTransactionsIdResponse 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 PayTransactionsIdResult ¶
type PayTransactionsIdResult struct { Result PayTransactionsIdResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type PayTransactionsJsapiNotifyGinRequest ¶ added in v1.0.52
type PayTransactionsJsapiNotifyGinRequest 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"` // 回调摘要 }
PayTransactionsJsapiNotifyGinRequest JSAPI下单 - 回调通知 - 请求参数
type PayTransactionsJsapiNotifyGinResponse ¶ added in v1.0.52
type PayTransactionsJsapiNotifyGinResponse struct { Appid string `json:"appid"` // 应用ID Mchid string `json:"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"` // 优惠功能 }
PayTransactionsJsapiNotifyGinResponse JSAPI下单 - 回调通知 - 解密后数据
type PayTransactionsJsapiResponse ¶ added in v1.0.44
type PayTransactionsJsapiResponse struct {
PrepayId string `json:"prepay_id"`
}
type PayTransactionsJsapiResult ¶
type PayTransactionsJsapiResult struct { Result PayTransactionsJsapiResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type PayTransactionsOutTradeNoCloseResult ¶ added in v1.0.44
type PayTransactionsOutTradeNoResponse ¶ added in v1.0.44
type PayTransactionsOutTradeNoResponse 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"` } `json:"scene_info"` 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"` } `json:"promotion_detail"` }
type PayTransactionsOutTradeNoResult ¶
type PayTransactionsOutTradeNoResult struct { Result PayTransactionsOutTradeNoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type RefundDomesticRefundsNotifyGinRequest ¶ added in v1.0.52
type RefundDomesticRefundsNotifyGinRequest 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"` // 通知数据 }
RefundDomesticRefundsNotifyGinRequest 申请退款API - 回调通知 - 请求参数
type RefundDomesticRefundsNotifyGinResponse ¶ added in v1.0.52
type RefundDomesticRefundsNotifyGinResponse struct { Mchid string `json:"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"` // 金额信息 }
RefundDomesticRefundsNotifyGinResponse 申请退款API - 回调通知 - 解密后数据
type RefundDomesticRefundsOutRefundNoResponse ¶ added in v1.0.44
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,omitempty"` // 退款成功时间 CreateTime string `json:"create_time"` // 退款创建时间 Status string `json:"status"` // 退款状态 FundsAccount string `json:"funds_account,omitempty"` // 资金账户 Amount struct { Total int `json:"total"` // 订单金额 Refund int `json:"refund"` // 退款金额 From []struct { Account string `json:"account"` // 出资账户类型 Amount int `json:"amount"` // 出资金额 } `json:"from,omitempty"` 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"` // 券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,omitempty"` // 微信侧商品编码 GoodsName string `json:"goods_name,omitempty"` // 商品名称 UnitPrice int `json:"unit_price"` // 商品单价 RefundAmount int `json:"refund_amount"` // 商品退款金额 RefundQuantity int `json:"refund_quantity"` // 商品退货数量 } `json:"goods_detail"` } `json:"promotion_detail,omitempty"` // 优惠退款信息 }
type RefundDomesticRefundsOutRefundNoResult ¶ added in v1.0.38
type RefundDomesticRefundsOutRefundNoResult struct { Result RefundDomesticRefundsOutRefundNoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type RefundDomesticRefundsResponse ¶ added in v1.0.44
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 string `json:"success_time,omitempty"` // 退款成功时间 CreateTime string `json:"create_time"` // 退款创建时间 Status string `json:"status"` // 退款状态 FundsAccount string `json:"funds_account,omitempty"` // 资金账户 Amount struct { Total int `json:"total"` // 订单金额 Refund int `json:"refund"` // 退款金额 From []struct { Account string `json:"account"` // 出资账户类型 Amount int `json:"amount"` // 出资金额 } `json:"from,omitempty"` 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"` // 券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,omitempty"` // 微信侧商品编码 GoodsName string `json:"goods_name,omitempty"` // 商品名称 UnitPrice int `json:"unit_price"` // 商品单价 RefundAmount int `json:"refund_amount"` // 商品退款金额 RefundQuantity int `json:"refund_quantity"` // 商品退货数量 } `json:"goods_detail"` } `json:"promotion_detail,omitempty"` // 优惠退款信息 }
type RefundDomesticRefundsResult ¶ added in v1.0.38
type RefundDomesticRefundsResult struct { Result RefundDomesticRefundsResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesBatchIdDetailsDetailIdResponse ¶ added in v1.0.52
type TransferBatchesBatchIdDetailsDetailIdResponse struct { Mchid string `json:"mchid"` // 商户号 OutBatchNo string `json:"out_batch_no"` // 商家批次单号 BatchId string `json:"batch_id"` // 微信批次单号 Appid string `json:"appid"` // 直连商户的appid OutDetailNo string `json:"out_detail_no"` // 商家明细单号 DetailId string `json:"detail_id"` // 微信明细单号 DetailStatus string `json:"detail_status"` // 明细状态 TransferAmount int `json:"transfer_amount"` // 转账金额 TransferRemark string `json:"transfer_remark"` // 转账备注 FailReason string `json:"fail_reason"` // 明细失败原因 Openid string `json:"openid"` // 用户在直连商户应用下的用户标示 UserName string `json:"user_name"` // 收款用户姓名 InitiateTime time.Time `json:"initiate_time"` // 转账发起时间 UpdateTime time.Time `json:"update_time"` // 明细更新时间 }
type TransferBatchesBatchIdDetailsDetailIdResult ¶ added in v1.0.52
type TransferBatchesBatchIdDetailsDetailIdResult struct { Result TransferBatchesBatchIdDetailsDetailIdResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesBatchIdResponse ¶ added in v1.0.52
type TransferBatchesBatchIdResponse struct { TransferBatch struct { Mchid string `json:"mchid"` // 商户号 OutBatchNo string `json:"out_batch_no"` // 商家批次单号 BatchId string `json:"batch_id"` // 微信批次单号 Appid string `json:"appid"` // 直连商户的appid BatchStatus string `json:"batch_status"` // 批次状态 BatchType string `json:"batch_type"` // 批次类型 BatchName string `json:"batch_name"` // 批次名称 BatchRemark string `json:"batch_remark"` // 批次备注 CloseReason string `json:"close_reason,omitempty"` // 批次关闭原因 TotalAmount int `json:"total_amount"` // 转账总金额 TotalNum int `json:"total_num"` // 转账总笔数 CreateTime string `json:"create_time"` // 批次创建时间 UpdateTime string `json:"update_time"` // 批次更新时间 SuccessAmount int `json:"success_amount"` // 转账成功金额 SuccessNum int `json:"success_num"` // 转账成功笔数 FailAmount int `json:"fail_amount"` // 转账失败金额 FailNum int `json:"fail_num"` // 转账失败笔数 } `json:"transfer_batch"` // 转账批次单 TransferDetailList []struct { DetailId string `json:"detail_id"` // 微信明细单号 OutDetailNo string `json:"out_detail_no"` // 商家明细单号 DetailStatus string `json:"detail_status"` // 明细状态 } `json:"transfer_detail_list,omitempty"` // 转账明细单列表 Offset int `json:"offset,omitempty"` // 请求资源起始位置 Limit int `json:"limit,omitempty"` // 最大资源条数 }
type TransferBatchesBatchIdResult ¶ added in v1.0.52
type TransferBatchesBatchIdResult struct { Result TransferBatchesBatchIdResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesOutBatchNoDetailsOutDetailResponse ¶ added in v1.0.52
type TransferBatchesOutBatchNoDetailsOutDetailResponse struct { OutBatchNo string `json:"out_batch_no"` // 商家批次单号 BatchId string `json:"batch_id"` // 微信批次单号 Appid string `json:"appid"` // 直连商户的appid OutDetailNo string `json:"out_detail_no"` // 商家明细单号 DetailId string `json:"detail_id"` // 微信明细单号 DetailStatus string `json:"detail_status"` // 明细状态 TransferAmount int `json:"transfer_amount"` // 转账金额 TransferRemark string `json:"transfer_remark"` // 转账备注 FailReason string `json:"fail_reason"` // 明细失败原因 Openid string `json:"openid"` // 用户在直连商户应用下的用户标示 UserName string `json:"user_name"` // 收款用户姓名 InitiateTime time.Time `json:"initiate_time"` // 转账发起时间 UpdateTime time.Time `json:"update_time"` // 明细更新时间 }
type TransferBatchesOutBatchNoDetailsOutDetailResult ¶ added in v1.0.52
type TransferBatchesOutBatchNoDetailsOutDetailResult struct { Result TransferBatchesOutBatchNoDetailsOutDetailResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesOutBatchNoResponse ¶ added in v1.0.52
type TransferBatchesOutBatchNoResponse struct { TransferBatch struct { Mchid string `json:"mchid"` // 商户号 OutBatchNo string `json:"out_batch_no"` // 商家批次单号 BatchId string `json:"batch_id"` // 微信批次单号 Appid string `json:"appid"` // 直连商户的appid BatchStatus string `json:"batch_status"` // 批次状态 BatchType string `json:"batch_type"` // 批次类型 BatchName string `json:"batch_name"` // 批次名称 BatchRemark string `json:"batch_remark"` // 批次备注 CloseReason string `json:"close_reason,omitempty"` // 批次关闭原因 TotalAmount int `json:"total_amount"` // 转账总金额 TotalNum int `json:"total_num"` // 转账总笔数 CreateTime string `json:"create_time"` // 批次创建时间 UpdateTime string `json:"update_time"` // 批次更新时间 SuccessAmount int `json:"success_amount"` // 转账成功金额 SuccessNum int `json:"success_num"` // 转账成功笔数 FailAmount int `json:"fail_amount"` // 转账失败金额 FailNum int `json:"fail_num"` // 转账失败笔数 } `json:"transfer_batch"` // 转账批次单 TransferDetailList []struct { DetailId string `json:"detail_id"` // 微信明细单号 OutDetailNo string `json:"out_detail_no"` // 商家明细单号 DetailStatus string `json:"detail_status"` // 明细状态 } `json:"transfer_detail_list,omitempty"` // 转账明细单列表 Offset int `json:"offset"` // 请求资源起始位置 Limit int `json:"limit"` // 最大资源条数 }
type TransferBatchesOutBatchNoResult ¶ added in v1.0.52
type TransferBatchesOutBatchNoResult struct { Result TransferBatchesOutBatchNoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesResponse ¶ added in v1.0.52
type TransferBatchesResult ¶ added in v1.0.52
type TransferBatchesResult struct { Result TransferBatchesResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
Source Files ¶
- client.go
- config.go
- const.go
- get.go
- merchant-service.complaints-v2.go
- pay.jsapi.go
- pay.transactions.id.go
- pay.transactions.jsapi.go
- pay.transactions.jsapi.notify.gin.go
- pay.transactions.out-trade-no.close.go
- pay.transactions.out-trade-no.go
- refund.domestic.refunds.go
- refund.domestic.refunds.notify.gin.go
- refund.domestic.refunds.out_refund_no.go
- request.go
- sign.decrypt.go
- sign.go
- transfer.batches.batch-id.details.detail-id.go
- transfer.batches.batch-id.go
- transfer.batches.go
- transfer.batches.out-batch-no.details.out-detail-no.go
- transfer.batches.out-batch-no.go