Documentation
¶
Index ¶
- Constants
- type 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) GetMchId() string
- func (c *Client) GetMchSslKey() string
- func (c *Client) GetMchSslSerialNo() string
- func (c *Client) MerchantServiceComplaintsV2(ctx context.Context, notMustParams ...gorequest.Params) (*MerchantServiceComplaintsV2Result, error)
- func (c *Client) PayTransactionsId(ctx context.Context, transactionId string, notMustParams ...gorequest.Params) (*PayTransactionsIdResult, error)
- func (c *Client) PayTransactionsJsapi(ctx context.Context, notMustParams ...gorequest.Params) (*PayTransactionsJsapiResult, error)
- func (c *Client) PayTransactionsJsapiNotifyHttp(ctx context.Context, w http.ResponseWriter, r *http.Request) (validateXml PayTransactionsJsapiNotifyHttpRequest, ...)
- func (c *Client) PayTransactionsOutTradeNo(ctx context.Context, outTradeNo string, notMustParams ...gorequest.Params) (*PayTransactionsOutTradeNoResult, error)
- func (c *Client) PayTransactionsOutTradeNoClose(ctx context.Context, OutTradeNo string, notMustParams ...gorequest.Params) (*PayTransactionsOutTradeNoCloseResult, error)
- func (c *Client) RefundDomesticRefunds(ctx context.Context, notMustParams ...gorequest.Params) (*RefundDomesticRefundsResult, error)
- func (c *Client) RefundDomesticRefundsNotifyHttp(ctx context.Context, w http.ResponseWriter, r *http.Request) (validateXml RefundDomesticRefundsNotifyHttpRequest, ...)
- func (c *Client) RefundDomesticRefundsOutRefundNo(ctx context.Context, outRefundNo string, notMustParams ...gorequest.Params) (*RefundDomesticRefundsOutRefundNoResult, error)
- func (c *Client) SetAesKey(v string) *Client
- func (c *Client) SetApiV3(v string) *Client
- func (c *Client) SetAppId(v string) *Client
- func (c *Client) SetAppSecret(v string) *Client
- func (c *Client) SetClientIP(clientIP string) *Client
- func (c *Client) SetLogFun(logFun gorequest.LogFunc)
- func (c *Client) SetMchId(v string) *Client
- func (c *Client) SetMchSslKey(v string) *Client
- func (c *Client) SetMchSslSerialNo(v string) *Client
- func (c *Client) SetTrace(trace bool)
- func (c *Client) SignDecrypt(aesKey, associatedData, nonce, ciphertext string) ([]byte, error)
- func (c *Client) TraceEndSpan()
- func (c *Client) TraceGetSpanID() (spanID string)
- func (c *Client) TraceGetTraceID() (traceID string)
- func (c *Client) TraceRecordError(err error, options ...trace.EventOption)
- func (c *Client) TraceSetAttributes(kv ...attribute.KeyValue)
- func (c *Client) TraceSetStatus(code codes.Code, description string)
- func (c *Client) TraceStartSpan(ctx context.Context, spanName string) context.Context
- func (c *Client) TransferBatches(ctx context.Context, notMustParams ...gorequest.Params) (*TransferBatchesResult, error)
- func (c *Client) TransferBatchesBatchIdBatchId(ctx context.Context, batchId string, notMustParams ...gorequest.Params) (*TransferBatchesBatchIdBatchIdResult, error)
- func (c *Client) TransferBatchesBatchIdBatchIdDetailsDetailIdDetailId(ctx context.Context, batchId string, detailId string, ...) (*TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult, error)
- func (c *Client) TransferBatchesOutBatchNo(ctx context.Context, notMustParams ...gorequest.Params) (*TransferBatchesOutBatchNoResult, error)
- func (c *Client) TransferBatchesOutBatchNoOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) (*TransferBatchesOutBatchNoOutBatchNoResult, error)
- func (c *Client) TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNo(ctx context.Context, outBatchNo, outDetailNo string, ...) (*TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult, error)
- func (c *Client) TransferBillReceipt(ctx context.Context, notMustParams ...gorequest.Params) (*TransferBillReceiptResult, error)
- func (c *Client) TransferBillReceiptOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) (*TransferBillReceiptOutBatchNoResult, error)
- func (c *Client) TransferDetailElectronicReceiptsGet(ctx context.Context, notMustParams ...gorequest.Params) (*TransferDetailElectronicReceiptsGetResult, error)
- func (c *Client) TransferDetailElectronicReceiptsPost(ctx context.Context, notMustParams ...gorequest.Params) (*TransferDetailElectronicReceiptsPostResult, error)
- type ClientConfig
- type GetJsApi
- type GetJsApiResult
- type MerchantServiceComplaintsV2Response
- type MerchantServiceComplaintsV2Result
- type PayTransactionsIdResponse
- type PayTransactionsIdResult
- type PayTransactionsJsapiNotifyHttpRequest
- type PayTransactionsJsapiNotifyHttpResponse
- type PayTransactionsJsapiResponse
- type PayTransactionsJsapiResult
- type PayTransactionsOutTradeNoCloseResult
- type PayTransactionsOutTradeNoResponse
- type PayTransactionsOutTradeNoResult
- type RefundDomesticRefundsNotifyHttpRequest
- type RefundDomesticRefundsNotifyHttpResponse
- 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"
)
const (
Version = "1.0.18"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client 实例
func (*Client) GetAppSecret ¶ added in v1.0.4
func (*Client) GetJsApi ¶
GetJsApi JSAPI调起支付API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_4.shtml
func (*Client) GetMchSslKey ¶
func (*Client) GetMchSslSerialNo ¶
func (*Client) MerchantServiceComplaintsV2 ¶
func (c *Client) MerchantServiceComplaintsV2(ctx context.Context, notMustParams ...gorequest.Params) (*MerchantServiceComplaintsV2Result, error)
MerchantServiceComplaintsV2 查询投诉单列表API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_11.shtml
func (*Client) PayTransactionsId ¶
func (c *Client) PayTransactionsId(ctx context.Context, transactionId string, notMustParams ...gorequest.Params) (*PayTransactionsIdResult, error)
PayTransactionsId 微信支付订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_2.shtml
func (*Client) PayTransactionsJsapi ¶
func (c *Client) PayTransactionsJsapi(ctx context.Context, notMustParams ...gorequest.Params) (*PayTransactionsJsapiResult, error)
PayTransactionsJsapi JSAPI下单 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_1.shtml
func (*Client) PayTransactionsJsapiNotifyHttp ¶ added in v1.0.16
func (c *Client) PayTransactionsJsapiNotifyHttp(ctx context.Context, w http.ResponseWriter, r *http.Request) (validateXml PayTransactionsJsapiNotifyHttpRequest, response PayTransactionsJsapiNotifyHttpResponse, gcm []byte, err error)
PayTransactionsJsapiNotifyHttp JSAPI下单 - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_1.shtml
func (*Client) PayTransactionsOutTradeNo ¶
func (c *Client) PayTransactionsOutTradeNo(ctx context.Context, outTradeNo string, notMustParams ...gorequest.Params) (*PayTransactionsOutTradeNoResult, error)
PayTransactionsOutTradeNo 商户订单号查询 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_2.shtml
func (*Client) PayTransactionsOutTradeNoClose ¶
func (c *Client) PayTransactionsOutTradeNoClose(ctx context.Context, OutTradeNo string, notMustParams ...gorequest.Params) (*PayTransactionsOutTradeNoCloseResult, error)
PayTransactionsOutTradeNoClose 关闭订单API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_3.shtml
func (*Client) RefundDomesticRefunds ¶
func (c *Client) RefundDomesticRefunds(ctx context.Context, notMustParams ...gorequest.Params) (*RefundDomesticRefundsResult, error)
RefundDomesticRefunds 申请退款API https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter6_1_26.shtml
func (*Client) RefundDomesticRefundsNotifyHttp ¶ added in v1.0.16
func (c *Client) RefundDomesticRefundsNotifyHttp(ctx context.Context, w http.ResponseWriter, r *http.Request) (validateXml RefundDomesticRefundsNotifyHttpRequest, response RefundDomesticRefundsNotifyHttpResponse, gcm []byte, err error)
RefundDomesticRefundsNotifyHttp 申请退款API - 回调通知 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter6_1_26.shtml
func (*Client) RefundDomesticRefundsOutRefundNo ¶
func (c *Client) RefundDomesticRefundsOutRefundNo(ctx context.Context, outRefundNo string, notMustParams ...gorequest.Params) (*RefundDomesticRefundsOutRefundNoResult, error)
RefundDomesticRefundsOutRefundNo 查询单笔退款API https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_5_10.shtml
func (*Client) SetAppSecret ¶
func (*Client) SetClientIP ¶ added in v1.0.17
SetClientIP 配置
func (*Client) SetMchSslKey ¶ added in v1.0.17
func (*Client) SetMchSslSerialNo ¶ added in v1.0.17
func (*Client) SignDecrypt ¶ added in v1.0.7
func (*Client) TraceEndSpan ¶ added in v1.0.17
func (c *Client) TraceEndSpan()
TraceEndSpan 结束OpenTelemetry链路追踪状态
func (*Client) TraceGetSpanID ¶ added in v1.0.17
TraceGetSpanID 获取OpenTelemetry链路追踪SpanID
func (*Client) TraceGetTraceID ¶ added in v1.0.17
TraceGetTraceID 获取OpenTelemetry链路追踪TraceID
func (*Client) TraceRecordError ¶ added in v1.0.17
func (c *Client) TraceRecordError(err error, options ...trace.EventOption)
TraceRecordError 记录OpenTelemetry链路追踪错误
func (*Client) TraceSetAttributes ¶ added in v1.0.17
TraceSetAttributes 设置OpenTelemetry链路追踪属性
func (*Client) TraceSetStatus ¶ added in v1.0.17
TraceSetStatus 设置OpenTelemetry链路追踪状态
func (*Client) TraceStartSpan ¶ added in v1.0.17
TraceStartSpan 开始OpenTelemetry链路追踪状态
func (*Client) TransferBatches ¶ added in v1.0.8
func (c *Client) TransferBatches(ctx context.Context, notMustParams ...gorequest.Params) (*TransferBatchesResult, error)
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.13
func (c *Client) TransferBatchesBatchIdBatchId(ctx context.Context, batchId string, notMustParams ...gorequest.Params) (*TransferBatchesBatchIdBatchIdResult, error)
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.13
func (c *Client) TransferBatchesBatchIdBatchIdDetailsDetailIdDetailId(ctx context.Context, batchId string, detailId string, notMustParams ...gorequest.Params) (*TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult, error)
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.8
func (c *Client) TransferBatchesOutBatchNo(ctx context.Context, notMustParams ...gorequest.Params) (*TransferBatchesOutBatchNoResult, error)
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.13
func (c *Client) TransferBatchesOutBatchNoOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) (*TransferBatchesOutBatchNoOutBatchNoResult, error)
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.13
func (c *Client) TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNo(ctx context.Context, outBatchNo, outDetailNo string, notMustParams ...gorequest.Params) (*TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult, error)
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.13
func (c *Client) TransferBillReceipt(ctx context.Context, notMustParams ...gorequest.Params) (*TransferBillReceiptResult, error)
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.13
func (c *Client) TransferBillReceiptOutBatchNo(ctx context.Context, outBatchNo string, notMustParams ...gorequest.Params) (*TransferBillReceiptOutBatchNoResult, error)
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.13
func (c *Client) TransferDetailElectronicReceiptsGet(ctx context.Context, notMustParams ...gorequest.Params) (*TransferDetailElectronicReceiptsGetResult, error)
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.13
func (c *Client) TransferDetailElectronicReceiptsPost(ctx context.Context, notMustParams ...gorequest.Params) (*TransferDetailElectronicReceiptsPostResult, error)
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.4
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 ¶
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 ¶
type MerchantServiceComplaintsV2Result struct {
Result MerchantServiceComplaintsV2Response // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type PayTransactionsIdResponse ¶
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 // 请求
}
type PayTransactionsJsapiNotifyHttpRequest ¶ added in v1.0.16
type PayTransactionsJsapiNotifyHttpRequest struct {
Id string `json:"status" xml:"id"` // 通知ID
CreateTime string `json:"create_time" xml:"create_time"` // 通知创建时间
EventType string `json:"event_type" xml:"event_type"` // 通知类型
ResourceType string `json:"resource_type" xml:"resource_type"` // 通知数据类型
Resource struct {
Algorithm string `json:"algorithm" xml:"algorithm"` // 加密算法类型
Ciphertext string `json:"ciphertext" xml:"ciphertext"` // 数据密文
AssociatedData string `json:"associated_data,omitempty" xml:"associated_data,omitempty"` // 附加数据
OriginalType string `json:"original_type" xml:"original_type"` // 原始类型
Nonce string `json:"nonce" xml:"nonce"` // 随机串
} `json:"resource" xml:"resource"` // 通知数据
Summary string `json:"summary" xml:"summary"` // 回调摘要
}
PayTransactionsJsapiNotifyHttpRequest JSAPI下单 - 回调通知 - 请求参数
type PayTransactionsJsapiNotifyHttpResponse ¶ added in v1.0.16
type PayTransactionsJsapiNotifyHttpResponse 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"` // 优惠功能
}
PayTransactionsJsapiNotifyHttpResponse JSAPI下单 - 回调通知 - 解密后数据
type PayTransactionsJsapiResponse ¶
type PayTransactionsJsapiResponse struct {
PrepayId string `json:"prepay_id"`
}
type PayTransactionsJsapiResult ¶
type PayTransactionsJsapiResult struct {
Result PayTransactionsJsapiResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type PayTransactionsOutTradeNoResponse ¶
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 // 请求
}
type RefundDomesticRefundsNotifyHttpRequest ¶ added in v1.0.16
type RefundDomesticRefundsNotifyHttpRequest struct {
Id string `json:"status" xml:"id"` // 通知ID
CreateTime string `json:"create_time" xml:"create_time"` // 通知创建时间
EventType string `json:"event_type" xml:"event_type"` // 通知类型
Summary string `json:"summary" xml:"summary"` // 通知简要说明
ResourceType string `json:"resource_type" xml:"resource_type"` // 通知数据类型
Resource struct {
Algorithm string `json:"algorithm" xml:"algorithm"` // 加密算法类型
Ciphertext string `json:"ciphertext" xml:"ciphertext"` // 数据密文
AssociatedData string `json:"associated_data,omitempty" xml:"associated_data,omitempty"` // 附加数据
OriginalType string `json:"original_type" xml:"original_type"` // 原始类型
Nonce string `json:"nonce" xml:"nonce"` // 随机串
} `json:"resource" xml:"resource"` // 通知数据
}
RefundDomesticRefundsNotifyHttpRequest 申请退款API - 回调通知 - 请求参数
type RefundDomesticRefundsNotifyHttpResponse ¶ added in v1.0.16
type RefundDomesticRefundsNotifyHttpResponse 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"` // 金额信息
}
RefundDomesticRefundsNotifyHttpResponse 申请退款API - 回调通知 - 解密后数据
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,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 ¶
type RefundDomesticRefundsOutRefundNoResult struct {
Result RefundDomesticRefundsOutRefundNoResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
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 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 ¶
type RefundDomesticRefundsResult struct {
Result RefundDomesticRefundsResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResponse ¶ added in v1.0.13
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.13
type TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResult struct {
Result TransferBatchesBatchIdBatchIdDetailsDetailIdDetailIdResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBatchesBatchIdBatchIdResponse ¶ added in v1.0.13
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.13
type TransferBatchesBatchIdBatchIdResult struct {
Result TransferBatchesBatchIdBatchIdResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResponse ¶ added in v1.0.13
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.13
type TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResult struct {
Result TransferBatchesOutBatchNoOutBatchNoDetailsOutDetailNoOutDetailNoResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBatchesOutBatchNoOutBatchNoResponse ¶ added in v1.0.13
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.13
type TransferBatchesOutBatchNoOutBatchNoResult struct {
Result TransferBatchesOutBatchNoOutBatchNoResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBatchesOutBatchNoResponse ¶ added in v1.0.8
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.8
type TransferBatchesOutBatchNoResult struct {
Result TransferBatchesOutBatchNoResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBatchesResponse ¶ added in v1.0.8
type TransferBatchesResult ¶ added in v1.0.8
type TransferBatchesResult struct {
Result TransferBatchesResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBillReceiptOutBatchNoResponse ¶ added in v1.0.13
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.13
type TransferBillReceiptOutBatchNoResult struct {
Result TransferBillReceiptOutBatchNoResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferBillReceiptResponse ¶ added in v1.0.13
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.13
type TransferBillReceiptResult struct {
Result TransferBillReceiptResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferDetailElectronicReceiptsGetResponse ¶ added in v1.0.13
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.13
type TransferDetailElectronicReceiptsGetResult struct {
Result TransferDetailElectronicReceiptsGetResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
type TransferDetailElectronicReceiptsPostResponse ¶ added in v1.0.13
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.13
type TransferDetailElectronicReceiptsPostResult struct {
Result TransferDetailElectronicReceiptsPostResponse // 结果
Body []byte // 内容
Http gorequest.Response // 请求
}
Source Files
¶
- client.config.go
- client.const.go
- client.go
- client.opentelemetry.go
- merchant-service.complaints-v2.go
- pay.jsapi.go
- pay.transactions.id.go
- pay.transactions.jsapi.go
- pay.transactions.jsapi.notify.http.go
- pay.transactions.out-trade-no.close.go
- pay.transactions.out-trade-no.go
- refund.domestic.refunds.go
- refund.domestic.refunds.notify.http.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
- version.go