Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) ConfigApp(appId, appSecret string) *Client
- func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)
- func (c *Client) Get(ctx context.Context, _method string, commonParams bool, ...) ([]byte, error)
- 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) 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) Post(ctx context.Context, _method string, commonParams bool, ...) ([]byte, error)
- 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) TransferBatchesBatchIdBatchId(ctx context.Context, batchId string, notMustParams ...gorequest.Params) *TransferBatchesBatchIdBatchIdResult
- func (c *Client) TransferBatchesBatchIdBatchIdDetailsDetailIdDetailId(ctx context.Context, batchId string, detailId string) *TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult
- func (c *Client) TransferBatchesOutBatchNo(ctx context.Context, notMustParams ...gorequest.Params) *TransferBatchesOutBatchNoResult
- func (c *Client) TransferBatchesOutBatchNoOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) *TransferBatchesOutBatchNoOutBatchNoResult
- func (c *Client) TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNo(ctx context.Context, outBatchNo, outDetailNo string, ...) *TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult
- func (c *Client) TransferBillReceipt(ctx context.Context, notMustParams ...gorequest.Params) *TransferBillReceiptResult
- func (c *Client) TransferBillReceiptOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) *TransferBillReceiptOutBatchNoResult
- func (c *Client) TransferDetailElectronicReceiptsGet(ctx context.Context, notMustParams ...gorequest.Params) *TransferDetailElectronicReceiptsGetResult
- func (c *Client) TransferDetailElectronicReceiptsPost(ctx context.Context, notMustParams ...gorequest.Params) *TransferDetailElectronicReceiptsPostResult
- 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 TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResponse
- type TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult
- type TransferBatchesBatchIdBatchIdResponse
- type TransferBatchesBatchIdBatchIdResult
- type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResponse
- type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult
- type TransferBatchesOutBatchNoOutBatchNoResponse
- type TransferBatchesOutBatchNoOutBatchNoResult
- type TransferBatchesOutBatchNoResponse
- type TransferBatchesOutBatchNoResult
- type TransferBatchesResponse
- type TransferBatchesResult
- type TransferBillReceiptOutBatchNoResponse
- type TransferBillReceiptOutBatchNoResult
- type TransferBillReceiptResponse
- type TransferBillReceiptResult
- type TransferDetailElectronicReceiptsGetResponse
- type TransferDetailElectronicReceiptsGetResult
- type TransferDetailElectronicReceiptsPostResponse
- type TransferDetailElectronicReceiptsPostResult
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) ConfigZapClientFun ¶ added in v1.0.141
func (c *Client) ConfigZapClientFun(apiZapLogFun golog.ApiZapLogFun)
ConfigZapClientFun 日志配置
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 发起商家转账 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/transfer-batch/initiate-batch-transfer.html
func (*Client) TransferBatchesBatchIdBatchId ¶ added in v1.0.86
func (c *Client) TransferBatchesBatchIdBatchId(ctx context.Context, batchId string, notMustParams ...gorequest.Params) *TransferBatchesBatchIdBatchIdResult
TransferBatchesBatchIdBatchId 通过微信批次单号查询批次单 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/transfer-batch/get-transfer-batch-by-no.html
func (*Client) TransferBatchesBatchIdBatchIdDetailsDetailIdDetailId ¶ added in v1.0.86
func (c *Client) TransferBatchesBatchIdBatchIdDetailsDetailIdDetailId(ctx context.Context, batchId string, detailId string) *TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult
TransferBatchesBatchIdBatchIdDetailsDetailIdDetailId 通过微信明细单号查询明细单 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/transfer-detail/get-transfer-detail-by-no.html
func (*Client) TransferBatchesOutBatchNo ¶ added in v1.0.52
func (c *Client) TransferBatchesOutBatchNo(ctx context.Context, notMustParams ...gorequest.Params) *TransferBatchesOutBatchNoResult
TransferBatchesOutBatchNo 通过微信批次单号查询批次单 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/transfer-batch/get-transfer-batch-by-no.html
func (*Client) TransferBatchesOutBatchNoOutBatchNo ¶ added in v1.0.86
func (c *Client) TransferBatchesOutBatchNoOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) *TransferBatchesOutBatchNoOutBatchNoResult
TransferBatchesOutBatchNoOutBatchNo 通过商家批次单号查询批次单 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/transfer-batch/get-transfer-batch-by-out-no.html
func (*Client) TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNo ¶ added in v1.0.86
func (c *Client) TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNo(ctx context.Context, outBatchNo, outDetailNo string, notMustParams ...gorequest.Params) *TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult
TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNo 通过商家明细单号查询明细单 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/transfer-detail/get-transfer-detail-by-out-no.html
func (*Client) TransferBillReceipt ¶ added in v1.0.86
func (c *Client) TransferBillReceipt(ctx context.Context, notMustParams ...gorequest.Params) *TransferBillReceiptResult
TransferBillReceipt 转账账单电子回单申请受理接口 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/electronic-signature/create-electronic-signature.html
func (*Client) TransferBillReceiptOutBatchNo ¶ added in v1.0.86
func (c *Client) TransferBillReceiptOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) *TransferBillReceiptOutBatchNoResult
TransferBillReceiptOutBatchNo 查询转账账单电子回单接口 https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/electronic-signature/get-electronic-signature-by-out-no.html
func (*Client) TransferDetailElectronicReceiptsGet ¶ added in v1.0.86
func (c *Client) TransferDetailElectronicReceiptsGet(ctx context.Context, notMustParams ...gorequest.Params) *TransferDetailElectronicReceiptsGetResult
TransferDetailElectronicReceiptsGet 查询转账明细电子回单受理结果API https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/electronic-receipt-api/query-electronic-receipt.html
func (*Client) TransferDetailElectronicReceiptsPost ¶ added in v1.0.86
func (c *Client) TransferDetailElectronicReceiptsPost(ctx context.Context, notMustParams ...gorequest.Params) *TransferDetailElectronicReceiptsPostResult
TransferDetailElectronicReceiptsPost 受理转账明细电子回单API https://pay.weixin.qq.com/docs/merchant/apis/batch-transfer-to-balance/electronic-receipt-api/create-electronic-receipt.html
type ClientConfig ¶ added in v1.0.52
type ClientConfig struct { AppId string `json:"app_id"` // 小程序或者公众号唯一凭证 AppSecret string // 小程序或者公众号唯一凭证密钥 MchId string `json:"mch_id"` // 微信支付的商户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 TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResponse ¶ added in v1.0.86
type TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResponse struct { Mchid string `json:"mchid"` // 微信支付分配的商户号 OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号,在商户系统内部唯一 BatchId string `json:"batch_id"` // 微信批次单号,微信商家转账系统返回的唯一标识 Appid string `json:"appid"` // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) OutDetailNo string `json:"out_detail_no"` // 商户系统内部区分转账批次单下不同转账明细单的唯一标识 DetailId string `json:"detail_id"` // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 DetailStatus string `json:"detail_status"` // INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) TransferAmount int `json:"transfer_amount"` // 转账金额单位为“分” TransferRemark string `json:"transfer_remark"` // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符 FailReason string `json:"fail_reason"` // 如果转账失败则有失败原因 Openid string `json:"openid"` // 商户appid下,某用户的openid UserName string `json:"user_name"` // 收款方姓名。采用标准RSA算法,公钥由微信侧提供 商户转账时传入了收款用户姓名、查询时会返回收款用户姓名 InitiateTime time.Time `json:"initiate_time"` // 转账发起的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime time.Time `json:"update_time"` // 明细最后一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE }
type TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult ¶ added in v1.0.86
type TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult struct { Result TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesBatchIdBatchIdResponse ¶ added in v1.0.86
type TransferBatchesBatchIdBatchIdResponse struct { TransferBatch struct { Mchid string `json:"mchid"` // 微信支付分配的商户号 OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号,在商户系统内部唯一 BatchId string `json:"batch_id"` // 微信批次单号,微信商家转账系统返回的唯一标识 Appid string `json:"appid"` // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) BatchStatus string `json:"batch_status"` // WAIT_PAY: 待付款确认。需要付款出资商户在商家助手小程序或服务商助手小程序进行付款确认 ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 PROCESSING:转账中。已开始处理批次内的转账明细单 FINISHED:已完成。批次内的所有转账明细单都已处理完成 CLOSED:已关闭。可查询具体的批次关闭原因确认 BatchType string `json:"batch_type"` // API:API方式发起 WEB:页面方式发起 BatchName string `json:"batch_name"` // 该笔批量转账的名称 BatchRemark string `json:"batch_remark"` // 转账说明,UTF8编码,最多允许32个字符 CloseReason string `json:"close_reason,omitempty"` // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因 TotalAmount int `json:"total_amount"` // 转账金额单位为“分” TotalNum int `json:"total_num"` // 一个转账批次单最多发起三千笔转账 CreateTime string `json:"create_time"` // 批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime string `json:"update_time"` // 批次最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE SuccessAmount int `json:"success_amount"` // 转账成功的金额,单位为“分”。当批次状态为“PROCESSING”(转账中)时,转账成功金额随时可能变化 SuccessNum int `json:"success_num"` // 转账成功的笔数。当批次状态为“PROCESSING”(转账中)时,转账成功笔数随时可能变化 FailAmount int `json:"fail_amount"` // 转账失败的金额,单位为“分” FailNum int `json:"fail_num"` // 转账失败的笔数 TransferSceneId string `json:"transfer_scene_id"` // 指定的转账场景ID } `json:"transfer_batch"` // 转账批次单基本信息 TransferDetailList []struct { DetailId string `json:"detail_id"` // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 OutDetailNo string `json:"out_detail_no"` // 户系统内部区分转账批次单下不同转账明细单的唯一标识 DetailStatus string `json:"detail_status"` // INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) } `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回。包括微信明细单号、明细状态信息 }
type TransferBatchesBatchIdBatchIdResult ¶ added in v1.0.86
type TransferBatchesBatchIdBatchIdResult struct { Result TransferBatchesBatchIdBatchIdResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResponse ¶ added in v1.0.86
type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResponse struct { Mchid string `json:"mchid"` // 微信支付分配的商户号 OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号,在商户系统内部唯一 BatchId string `json:"batch_id"` // 微信批次单号,微信商家转账系统返回的唯一标识 Appid string `json:"appid"` // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) OutDetailNo string `json:"out_detail_no"` // 商户系统内部区分转账批次单下不同转账明细单的唯一标识 DetailId string `json:"detail_id"` // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 DetailStatus string `json:"detail_status"` // INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) TransferAmount int `json:"transfer_amount"` // 转账金额单位为“分” TransferRemark string `json:"transfer_remark"` // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符 FailReason string `json:"fail_reason"` // 如果转账失败则有失败原因 Openid string `json:"openid"` // 商户appid下,某用户的openid UserName string `json:"user_name"` // 收款方姓名。采用标准RSA算法,公钥由微信侧提供 商户转账时传入了收款用户姓名、查询时会返回收款用户姓名 InitiateTime time.Time `json:"initiate_time"` // 转账发起的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime time.Time `json:"update_time"` // 明细最后一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE }
type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult ¶ added in v1.0.86
type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult struct { Result TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBatchesOutBatchNoOutBatchNoResponse ¶ added in v1.0.86
type TransferBatchesOutBatchNoOutBatchNoResponse struct { TransferBatch struct { Mchid string `json:"mchid"` // 微信支付分配的商户号 OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号,在商户系统内部唯一 BatchId string `json:"batch_id"` // 微信批次单号,微信商家转账系统返回的唯一标识 Appid string `json:"appid"` // 申请商户号的appid或商户号绑定的appid(企业号corpid即为此appid) BatchStatus string `json:"batch_status"` // WAIT_PAY: 待付款确认。需要付款出资商户在商家助手小程序或服务商助手小程序进行付款确认 ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 PROCESSING:转账中。已开始处理批次内的转账明细单 FINISHED:已完成。批次内的所有转账明细单都已处理完成 CLOSED:已关闭。可查询具体的批次关闭原因确认 BatchType string `json:"batch_type"` // API:API方式发起 WEB:页面方式发起 BatchName string `json:"batch_name"` // 该笔批量转账的名称 BatchRemark string `json:"batch_remark"` // 转账说明,UTF8编码,最多允许32个字符 CloseReason string `json:"close_reason,omitempty"` // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因 TotalAmount int `json:"total_amount"` // 转账金额单位为“分” TotalNum int `json:"total_num"` // 一个转账批次单最多发起三千笔转账 CreateTime string `json:"create_time"` // 批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime string `json:"update_time"` // 批次最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE SuccessAmount int `json:"success_amount"` // 转账成功的金额,单位为“分”。当批次状态为“PROCESSING”(转账中)时,转账成功金额随时可能变化 SuccessNum int `json:"success_num"` // 转账成功的笔数。当批次状态为“PROCESSING”(转账中)时,转账成功笔数随时可能变化 FailAmount int `json:"fail_amount"` // 转账失败的金额,单位为“分” FailNum int `json:"fail_num"` // 转账失败的笔数 TransferSceneId string `json:"transfer_scene_id"` // 指定的转账场景ID } `json:"transfer_batch"` // 转账批次单基本信息 TransferDetailList []struct { DetailId string `json:"detail_id"` // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 OutDetailNo string `json:"out_detail_no"` // 商户系统内部区分转账批次单下不同转账明细单的唯一标识 DetailStatus string `json:"detail_status"` // INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) } `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回。包括微信明细单号、明细状态信息 }
type TransferBatchesOutBatchNoOutBatchNoResult ¶ added in v1.0.86
type TransferBatchesOutBatchNoOutBatchNoResult struct { Result TransferBatchesOutBatchNoOutBatchNoResponse // 结果 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或商户号绑定的appid(企业号corpid即为此appid) BatchStatus string `json:"batch_status"` // WAIT_PAY: 待付款确认。需要付款出资商户在商家助手小程序或服务商助手小程序进行付款确认 ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 PROCESSING:转账中。已开始处理批次内的转账明细单 FINISHED:已完成。批次内的所有转账明细单都已处理完成 CLOSED:已关闭。可查询具体的批次关闭原因确认 BatchType string `json:"batch_type"` // API:API方式发起 WEB:页面方式发起 BatchName string `json:"batch_name"` // 该笔批量转账的名称 BatchRemark string `json:"batch_remark"` // 转账说明,UTF8编码,最多允许32个字符 CloseReason string `json:"close_reason,omitempty"` // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因 TotalAmount int `json:"total_amount"` // 转账金额单位为“分” TotalNum int `json:"total_num"` // 一个转账批次单最多发起三千笔转账 CreateTime string `json:"create_time"` // 批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime string `json:"update_time"` // 批次最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE SuccessAmount int `json:"success_amount"` // 转账成功的金额,单位为“分”。当批次状态为“PROCESSING”(转账中)时,转账成功金额随时可能变化 SuccessNum int `json:"success_num"` // 转账成功的笔数。当批次状态为“PROCESSING”(转账中)时,转账成功笔数随时可能变化 FailAmount int `json:"fail_amount"` // 转账失败的金额,单位为“分” FailNum int `json:"fail_num"` // 转账失败的笔数 TransferSceneId string `json:"transfer_scene_id"` // 指定的转账场景ID } `json:"transfer_batch"` // 转账批次单基本信息 TransferDetailList []struct { DetailId string `json:"detail_id"` // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识 OutDetailNo string `json:"out_detail_no"` // 商户系统内部区分转账批次单下不同转账明细单的唯一标识 DetailStatus string `json:"detail_status"` // INIT: 初始态。 系统转账校验中 WAIT_PAY: 待确认。待商户确认, 符合免密条件时, 系统会自动扭转为转账中 PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单) } `json:"transfer_detail_list,omitempty"` // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回。包括微信明细单号、明细状态信息 }
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 // 错误 }
type TransferBillReceiptOutBatchNoResponse ¶ added in v1.0.86
type TransferBillReceiptOutBatchNoResponse struct { OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号,在商户系统内部唯一。需要电子回单的批次单号 SignatureNo string `json:"signature_no"` // 电子回单申请单号,申请单据的唯一标识 SignatureStatus string `json:"signature_status"` // ACCEPTED:已受理,电子签章已受理成功 FINISHED:已完成。电子签章已处理完成 HashType string `json:"hash_type"` // 电子回单文件的hash方法 HashValue string `json:"hash_value"` // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性 DownloadUrl string `json:"download_url"` // 电子回单文件的下载地址 CreateTime time.Time `json:"create_time"` // 电子签章单创建时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime time.Time `json:"update_time"` // 电子签章单最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE }
type TransferBillReceiptOutBatchNoResult ¶ added in v1.0.86
type TransferBillReceiptOutBatchNoResult struct { Result TransferBillReceiptOutBatchNoResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferBillReceiptResponse ¶ added in v1.0.86
type TransferBillReceiptResponse struct { OutBatchNo string `json:"out_batch_no"` // 商户系统内部的商家批次单号,在商户系统内部唯一。需要电子回单的批次单号 SignatureNo string `json:"signature_no"` // 电子回单申请单号,申请单据的唯一标识 SignatureStatus string `json:"signature_status"` // ACCEPTED:已受理,电子签章已受理成功 FINISHED:已完成。电子签章已处理完成 HashType string `json:"hash_type"` // 电子回单文件的hash方法 HashValue string `json:"hash_value"` // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性 DownloadUrl string `json:"download_url"` // 电子回单文件的下载地址 CreateTime time.Time `json:"create_time"` // 电子签章单创建时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE UpdateTime time.Time `json:"update_time"` // 电子签章单最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE }
type TransferBillReceiptResult ¶ added in v1.0.86
type TransferBillReceiptResult struct { Result TransferBillReceiptResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferDetailElectronicReceiptsGetResponse ¶ added in v1.0.86
type TransferDetailElectronicReceiptsGetResponse struct { AcceptType string `json:"accept_type"` // 电子回单受理类型:BATCH_TRANSFER:批量转账明细电子回单 TRANSFER_TO_POCKET:企业付款至零钱电子回单 TRANSFER_TO_BANK:企业付款至银行卡电子回单 OutBatchNo string `json:"out_batch_no"` // 需要电子回单的批量转账明细单所在的转账批次的单号,该单号为商户申请转账时生成的商户单号。受理类型为BATCH_TRANSFER时该单号必填,否则该单号留空。 OutDetailNo string `json:"out_detail_no"` // 该单号为商户申请转账时生成的商家转账明细单号。 1.受理类型为BATCH_TRANSFER时填写商家批量转账明细单号。2. 受理类型为TRANSFER_TO_POCKET或TRANSFER_TO_BANK时填写商家转账单号。 SignatureNo string `json:"signature_no"` // 电子回单受理单号,受理单据的唯一标识 SignatureStatus string `json:"signature_status"` // 枚举值: ACCEPTED:已受理,电子签章已受理成功 FINISHED:已完成。电子签章已处理完成 HashType string `json:"hash_type"` // 电子回单文件的hash方法,回单状态为:FINISHED时返回 HashValue string `json:"hash_value"` // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性,回单状态为:FINISHED时返回 DownloadUrl string `json:"download_url"` // 电子回单文件的下载地址,回单状态为:FINISHED时返回。URL有效时长为10分钟,10分钟后需要重新去获取下载地址(但不需要走受理) }
type TransferDetailElectronicReceiptsGetResult ¶ added in v1.0.86
type TransferDetailElectronicReceiptsGetResult struct { Result TransferDetailElectronicReceiptsGetResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
type TransferDetailElectronicReceiptsPostResponse ¶ added in v1.0.86
type TransferDetailElectronicReceiptsPostResponse struct { AcceptType string `json:"accept_type"` // 电子回单受理类型:BATCH_TRANSFER:批量转账明细电子回单 TRANSFER_TO_POCKET:企业付款至零钱电子回单 TRANSFER_TO_BANK:企业付款至银行卡电子回单 OutBatchNo string `json:"out_batch_no"` // 需要电子回单的批量转账明细单所在的转账批次的单号,该单号为商户申请转账时生成的商户单号。受理类型为BATCH_TRANSFER时该单号必填,否则该单号留空。 OutDetailNo string `json:"out_detail_no"` // 该单号为商户申请转账时生成的商家转账明细单号。 1.受理类型为BATCH_TRANSFER时填写商家批量转账明细单号。2. 受理类型为TRANSFER_TO_POCKET或TRANSFER_TO_BANK时填写商家转账单号。 SignatureNo string `json:"signature_no"` // 电子回单受理单号,受理单据的唯一标识 SignatureStatus string `json:"signature_status"` // 枚举值: ACCEPTED:已受理,电子签章已受理成功 FINISHED:已完成。电子签章已处理完成 HashType string `json:"hash_type"` // 电子回单文件的hash方法,回单状态为:FINISHED时返回 HashValue string `json:"hash_value"` // 电子回单文件的hash值,用于下载之后验证文件的完整、正确性,回单状态为:FINISHED时返回 DownloadUrl string `json:"download_url"` // 电子回单文件的下载地址,回单状态为:FINISHED时返回。URL有效时长为10分钟,10分钟后需要重新去获取下载地址(但不需要走受理) }
type TransferDetailElectronicReceiptsPostResult ¶ added in v1.0.86
type TransferDetailElectronicReceiptsPostResult struct { Result TransferDetailElectronicReceiptsPostResponse // 结果 Body []byte // 内容 Http gorequest.Response // 请求 Err error // 错误 }
Source Files ¶
- api.go
- 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-detail.electronic-receipts.get.go
- transfer-detail.electronic-receipts.post.go
- transfer.batches.batch-id.batch_id.details.detail-id.detail_id.go
- transfer.batches.batch-id.batch_id.go
- transfer.batches.go
- transfer.batches.out-batch-no.go
- transfer.batches.out-batch-no.out_batch_no.details.out-detail-no.out_detail_no.go
- transfer.batches.out-batch-no.out_batch_no.go
- transfer.bill-receipt.go
- transfer.bill-receipt.out_batch_no.go