dto

package
v0.0.0-...-2580af4 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WithdrawalStatusCreateSuccess = "CREATE_SUCCESS" // 受理成功
	WithdrawalStatusSuccess       = "SUCCESS"        // 提现成功
	WithdrawalStatusFAIL          = "FAIL"           // 提现失败
	WithdrawalStatusREFUND        = "REFUND"         // 提现退票
	WithdrawalStatusCLOSE         = "CLOSE"          // 关单
)

提现状态

View Source
const (
	NotifyEventTypeProfitsharing       = "PROFITSHARING"
	NotifyEventTypeProfitsharingReturn = "PROFITSHARING_RETURN"
)

分账动帐通知常量

View Source
const (
	NotifyEventTypeRefundSuccess  = "REFUND.SUCCESS"  // 退款成功
	NotifyEventTypeRefundAbnormal = "REFUND.ABNORMAL" // 退款异常
	NotifyEventTypeRefundClosed   = "REFUND.CLOSED"   // 退款关闭
)

退款通知event_type字段常量值

View Source
const (
	NotifyEventTypeTransactionType = "TRANSACTION.SUCCESS"
)

支付通知event_type字段常量值,具体值

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateData

type CertificateData struct {
	EncryptCertificate *EncryptCertificate `json:"encrypt_certificate"`
	DecryptCertificate string              `json:"decrypt_certificate"`
	SerialNo           string              `json:"serial_no"`
	EffectiveTime      time.Time           `json:"effective_time "`
	ExpireTime         time.Time           `json:"expire_time "`
}

type CertificateResp

type CertificateResp struct {
	Data []*CertificateData `json:"data"`
}

type CombinePayerInfo

type CombinePayerInfo struct {
	Openid string `json:"openid"` // 使用合单appid获取的对应用户openid。是用户在商户appid下的唯一标识。
}

支付者

type CombineTransactionsReq

type CombineTransactionsReq struct {
	TradeType         TradeType         `json:"-"`
	SceneInfo         *SceneInfo        `json:"scene_info,omitempty"`         // 支付场景信息描述
	CombinePayerInfo  *CombinePayerInfo `json:"combine_payer_info,omitempty"` // 非必填,App支付没有OpenId所以该字段不传
	CombineAppid      string            `json:"combine_appid" `               // 该字段在URL中传参
	CombineMchid      string            `json:"combine_mchid"`                // 合单发起方商户号
	CombineOutTradeNo string            `json:"combine_out_trade_no"`         // 合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一
	TimeStart         string            `json:"time_start,omitempty"`         // 订单生成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
	TimeExpire        string            `json:"time_expire,omitempty"`        // 订单失效时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
	NotifyUrl         string            `json:"notify_url"`                   // 接收微信支付异步通知回调地址,通知url必须为直接可访问的URL,不能携带参数。 格式: URL
	LimitPay          []string          `json:"limit_pay,omitempty"`          // 指定支付方式
	SubOrders         []*SubOrder       `json:"sub_orders"`                   // 最多支持子单条数:50
}

合单支付参数

type CombineTransactionsResp

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

合单支付返回结果

type EncryptCertificate

type EncryptCertificate struct {
	Algorithm      string `json:"algorithm"`
	Nonce          string `json:"nonce"`
	AssociatedData string `json:"associated_data"`
	Ciphertext     string `json:"ciphertext"`
}

type NotifyProfitSharingReceiver

type NotifyProfitSharingReceiver struct {
	Amount      int64  `json:"amount"`      // 分账动账金额,单位为分,只能为整数
	Type        string `json:"type"`        // MERCHANT_ID:商户ID PERSONAL_WECHATID:个人微信号 PERSONAL_OPENID:个人openid(由父商户APPID转换得到) PERSONAL_SUB_OPENID:个人sub_openid(由子商户APPID转换得到)
	Account     string `json:"account"`     // 1、类型是MERCHANT_ID时,是商户ID 2、类型是PERSONAL_WECHATID时,是个人微信号 3、类型是PERSONAL_OPENID时,是个人openid 4、类型是PERSONAL_SUB_OPENID时,是个人sub_openid
	Description string `json:"description"` // 分账/回退描述
}

type PaymentNotify

type PaymentNotify struct {
	Resource     *PaymentNotifyResource `json:"resource"`      // 通知资源数据 json格式
	ID           string                 `json:"id"`            // 通知的唯一ID
	CreateTime   string                 `json:"create_time"`   // 通知创建的时间,格式为yyyyMMddHHmmss
	ResourceType string                 `json:"resource_type"` // 通知的资源数据类型,支付成功通知为encrypt-resource
	EventType    string                 `json:"event_type"`    // 通知的类型,支付成功通知的类型为TRANSACTION.SUCCESS
}

type PaymentNotifyAmount

type PaymentNotifyAmount struct {
	TotalAmount   int64  `json:"total_amount"`   // 子单金额,单位为分
	PayerAmount   int64  `json:"payer_amount"`   // 订单现金支付金额
	Currency      string `json:"currency"`       // 符合ISO 4217标准的三位字母代码,人民币:CNY
	PayerCurrency string `json:"payer_currency"` // 货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY
}

type PaymentNotifyDecryption

type PaymentNotifyDecryption struct {
	SceneInfo         *SceneInfo               `json:"scene_info"` // 支付场景信息描述
	CombinePayerInfo  *CombinePayerInfo        `json:"combine_payer_info"`
	CombineAppid      string                   `json:"combine_appid"`        // 合单发起方的Appid
	CombineOutTradeNo string                   `json:"combine_out_trade_no"` // 合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一
	CombineMchid      string                   `json:"combine_mchid"`        // 合单发起方商户号
	SubOrders         []*PaymentNotifySubOrder `json:"sub_orders"`           // 最多支持子单条数:50
}

type PaymentNotifyResource

type PaymentNotifyResource struct {
	Algorithm      string `json:"algorithm"`       // 对开启结果数据进行加密的加密算法,目前只支持AEAD_AES_256_GCM
	Ciphertext     string `json:"ciphertext"`      // Base64编码后的开启/停用结果数据密文
	Nonce          string `json:"nonce"`           // 附加数据
	AssociatedData string `json:"associated_data"` // 加密使用的随机串
}

type PaymentNotifyResp

type PaymentNotifyResp struct {
	*PaymentNotify
	Decryption *PaymentNotifyDecryption `json:"decryption"` // 解码后的信息
}

type PaymentNotifySubOrder

type PaymentNotifySubOrder struct {
	Amount        *PaymentNotifyAmount `json:"amount"`         // 订单金额信息
	Mchid         string               `json:"mchid"`          // 子单发起方商户号,必须与发起方Appid有绑定关系
	TradeType     string               `json:"trade_type"`     // 交易类型
	TradeState    string               `json:"trade_state"`    // 交易状态 枚举值:SUCCESS:支付成功 REFUND:转入退款 NOTPAY:未支付 CLOSED:已关闭 USERPAYING:用户支付中 PAYERROR:支付失败(其他原因,如银行返回失败)
	BankType      string               `json:"bank_type"`      // 银行类型,采用字符串类型的银行标识
	Attach        string               `json:"attach"`         // 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。
	TransactionID string               `json:"transaction_id"` // 微信支付订单号
	OutTradeNo    string               `json:"out_trade_no"`   // 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 字符字节限制: [6, 32]
	SubMchid      string               `json:"sub_mchid"`      // 二级商户商户号,由微信支付生成并下发。
	SuccessTime   time.Time            `json:"success_time"`   // 订单支付时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss:sss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss:sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。
}

type ProfitSharingNotify

type ProfitSharingNotify struct {
	Resource     *ProfitSharingNotifyResource `json:"resource"`      // 通知资源数据
	Id           string                       `json:"id"`            // 通知的唯一ID
	EventType    string                       `json:"event_type"`    // 通知的类型:PROFITSHARING:分账 PROFITSHARING_RETURN:分账回退
	Summary      string                       `json:"summary"`       // 通知简要说明
	ResourceType string                       `json:"resource_type"` // 通知的资源数据类型,支付成功通知为encrypt-resource
	CreateTime   time.Time                    `json:"create_time"`   // 通知创建的时间,Rfc3339标准 格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
}

type ProfitSharingNotifyDecryption

type ProfitSharingNotifyDecryption struct {
	Receiver      *NotifyProfitSharingReceiver `json:"receiver"`       // 分账接收方对象
	Mchid         string                       `json:"mchid"`          // 直连模式分账发起和出资商户
	SpMchid       string                       `json:"sp_mchid"`       // 服务商模式分账发起商户
	SubMchid      string                       `json:"sub_mchid"`      // 服务商模式分账出资商户
	TransactionID string                       `json:"transaction_id"` // 微信支付订单号
	OrderID       string                       `json:"order_id"`       // 微信分账/回退单号
	OutOrderNo    string                       `json:"out_order_no"`   // 分账方系统内部的分账/回退单号
	SuccessTime   time.Time                    `json:"success_time"`   // 成功时间,Rfc3339标准 格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
}

type ProfitSharingNotifyResource

type ProfitSharingNotifyResource struct {
	Algorithm      string `json:"algorithm"`       // 对开启结果数据进行加密的加密算法,目前只支持AEAD_AES_256_GCM
	Ciphertext     string `json:"ciphertext"`      // Base64编码后的开启/停用结果数据密文
	Nonce          string `json:"nonce"`           // 附加数据
	AssociatedData string `json:"associated_data"` // 加密使用的随机串
	OriginalType   string `json:"original_type"`   // 加密前的对象类型,分账动账通知的类型为profitsharing
}

type ProfitSharingNotifyResp

type ProfitSharingNotifyResp struct {
	*ProfitSharingNotify
	Decryption *ProfitSharingNotifyDecryption `json:"decryption"` // 解密数据
}

type ProfitSharingReceiver

type ProfitSharingReceiver struct {
	Amount        int64  `json:"amount"`         // 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额
	ReceiverMchid string `json:"receiver_mchid"` // 只支持电商平台商户和电商平台二级商户,填写微信支付分配的商户号
	Description   string `json:"description"`    // 分账的原因描述,分账账单中需要体现
}

分账接收方

type ProfitSharingReq

type ProfitSharingReq struct {
	Finish        bool                     `json:"finish"`         // 是否完成分账 1、如果为true,则分账接收商户只支持电商平台商户,且该笔订单剩余未分账的金额会解冻回电商平台二级商户; 2、如果为false,则分账接收商户可以为电商平台商户或者电商平台二级商户,且该笔订单剩余未分账的金额不会解冻回电商平台二级商户,可以对该笔订单再次进行分账。
	SubMchid      string                   `json:"sub_mchid"`      // 分账出资的电商平台二级商户,填写微信支付分配的商户号
	TransactionId string                   `json:"transaction_id"` // 微信支付订单号
	OutOrderNo    string                   `json:"out_order_no"`   // 商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次
	Receivers     []*ProfitSharingReceiver `json:"receivers"`      // 分账接收方列表,可以设置出资商户作为分账接受方,电商平台模式下,最多可有2个分账接收方
}

type ProfitSharingResp

type ProfitSharingResp struct {
	SubMchid      string `json:"sub_mchid"`      // 分账出资的电商平台二级商户,填写微信支付分配的商户号
	TransactionID string `json:"transaction_id"` // 微信支付订单号
	OutOrderNo    string `json:"out_order_no"`   // 商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次
	OrderID       string `json:"order_id"`       // 微信分账单号,微信系统返回的唯一标识
}

type ProfitSharingStatusReceiver

type ProfitSharingStatusReceiver struct {
	Amount        int64     `json:"amount"`         // 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额
	ReceiverMchid string    `json:"receiver_mchid"` // 只支持电商平台商户和电商平台二级商户,填写微信支付分配的商户号
	Description   string    `json:"description"`    // 分账的原因描述,分账账单中需要体现
	Result        string    `json:"result"`         // 分账结果,枚举值: PENDING:待分账 SUCCESS:分账成功 ADJUST:分账失败待调账 RETURNED:已转回分账方 CLOSED:已关闭
	FailReason    string    `json:"fail_reason"`    // 分账失败原因,枚举值: ACCOUNT_ABNORMAL:分账接收账户异常 NO_RELATION:分账关系已解除
	FinishTime    time.Time `json:"finish_time"`    // 分账完成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss:sss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss:sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。
}

type PromotionDetail

type PromotionDetail struct {
	Amount       int64  `json:"amount"`        // 优惠券面额,用户享受优惠的金额(优惠券面额=微信出资金额+商家出资金额+其他出资方金额 )
	RefundAmount int64  `json:"refund_amount"` // 优惠退款金额,代金券退款金额<=退款金额,退款金额-代金券或立减优惠退款金额为现金,说明详见
	PromotionID  string `json:"promotion_id"`  // 券或者立减优惠id
	Scope        string `json:"scope"`         // 优惠范围,GLOBAL- 全场代金券 SINGLE- 单品优惠
	Type         string `json:"type"`          // 优惠类型,COUPON:充值型代金券,商户需要预先充值营销经费 DISCOUNT:免充值型优惠券,商户不需要预先充值营销经费
}

type QueryFundBalanceReq

type QueryFundBalanceReq struct {
	SubMchid string `json:"sub_mchid"` // 电商平台二级商户号,由微信支付生成并下发。
}

type QueryFundBalanceResp

type QueryFundBalanceResp struct {
	AvailableAmount int64  `json:"available_amount"` // 可用余额
	PendingAmount   int64  `json:"pending_amount"`   // 不可用余额
	SubMchid        string `json:"sub_mchid"`        // 电商平台二级商户号,由微信支付生成并下发。
}

type QueryProfitSharingStatusReq

type QueryProfitSharingStatusReq struct {
	SubMchid      string `json:"sub_mchid"`      // 二级商户号
	TransactionId string `json:"transaction_id"` // 微信支付订单号
	OutOrderNo    string `json:"out_order_no"`   // 商户系统内部的分账单号
}

type QueryProfitSharingStatusResp

type QueryProfitSharingStatusResp struct {
	FinishAmount      int64                          `json:"finish_amount"`      // 分账完结的分账金额,单位为分, 仅当查询分账完结的执行结果时,存在本字段
	SubMchid          string                         `json:"sub_mchid"`          // 分账出资的电商平台二级商户,填写微信支付分配的商户号
	TransactionID     string                         `json:"transaction_id"`     // 微信支付订单号
	OutOrderNo        string                         `json:"out_order_no"`       // 商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次
	OrderID           string                         `json:"order_id"`           // 微信分账单号,微信系统返回的唯一标识
	Status            string                         `json:"status"`             //  分账单状态,枚举值: ACCEPTED:受理成功 PROCESSING:处理中 FINISHED:分账成功 CLOSED:处理失败,已关单
	CloseReason       string                         `json:"close_reason"`       // 关单原因描述,枚举值: NO_AUTH:分账授权已解除
	FinishDescription string                         `json:"finish_description"` // 分账完结的原因描述,仅当查询分账完结的执行结果时,存在本字段
	Receivers         []*ProfitSharingStatusReceiver `json:"receivers"`          // 分账接收方列表,可以设置出资商户作为分账接受方,电商平台模式下,最多可有2个分账接收方。
}

type QueryWithdrawalStatusReq

type QueryWithdrawalStatusReq struct {
	SubMchid   string `json:"sub_mchid"`   // 电商平台二级商户号,由微信支付生成并下发。
	WithdrawId string `json:"withdraw_id"` // 电商平台提交二级商户提现申请后,由微信支付返回的申请单号,作为查询申请状态的唯一标识
}

type QueryWithdrawalStatusResp

type QueryWithdrawalStatusResp struct {
	Amount       int64     `json:"amount"`              // 提现金额单位(分)
	SubMchid     string    `json:"sub_mchid,omitempty"` // 电商平台二级商户号,由微信支付生成并下发。
	SpMchid      string    `json:"sp_mchid"`            // 电商平台商户号
	Status       string    `json:"status"`              // 提现状态,枚举值: CREATE_SUCCESS:受理成功 SUCCESS:提现成功 FAIL:提现失败 REFUND:提现退票 CLOSE:关单
	WithdrawID   string    `json:"withdraw_id"`         // 电商平台提交二级商户提现申请后,由微信支付返回的申请单号,作为查询申请状态的唯一标识
	OutRequestNo string    `json:"out_request_no"`      // 商户提现单号
	Reason       string    `json:"reason"`              // 提现失败原因
	Remark       string    `json:"remark"`              // 提现备注
	BankMemo     string    `json:"bank_memo"`           // 银行备注
	CreateTime   time.Time `json:"create_time"`         // 发起提现时间,遵循RFC3339标准格式
	UpdateTime   time.Time `json:"update_time"`         // 提现状态更新时间,遵循RFC3339标准格式
}

type RefundAmount

type RefundAmount struct {
	Refund   int64  `json:"refund"`             // 退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额
	Total    int64  `json:"total"`              // 原支付交易的订单总金额,币种的最小单位,只能为整数
	Currency string `json:"currency,omitempty"` // 符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY
}

type RefundAmountInfo

type RefundAmountInfo struct {
	Refund         int64  `json:"refund"`          // 退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额。
	PayerRefund    int64  `json:"payer_refund"`    // 退款给用户的金额,不包含所有优惠券金额
	DiscountRefund int64  `json:"discount_refund"` // 优惠券的退款金额,原支付单的优惠按比例退款
	Currency       string `json:"currency"`        // 符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY
}

type RefundNotify

type RefundNotify struct {
	Resource     *ProfitSharingNotifyResource `json:"resource"`
	Id           string                       `json:"id"`
	EventType    string                       `json:"event_type"`
	Summary      string                       `json:"summary"`
	ResourceType string                       `json:"resource_type"`
	CreateTime   time.Time                    `json:"create_time"`
}

type RefundNotifyAmount

type RefundNotifyAmount struct {
	Total       int64 `json:"total"`
	Refund      int64 `json:"refund"`
	PayerTotal  int64 `json:"payer_total"`
	PayerRefund int64 `json:"payer_refund"`
}

type RefundNotifyDecryption

type RefundNotifyDecryption struct {
	Amount              *RefundNotifyAmount `json:"amount"`
	SpMchid             string              `json:"sp_mchid"`
	SubMchid            string              `json:"sub_mchid"`
	TransactionID       string              `json:"transaction_id"`
	OutTradeNo          string              `json:"out_trade_no"`
	RefundID            string              `json:"refund_id"`
	OutRefundNo         string              `json:"out_refund_no"`
	RefundStatus        string              `json:"refund_status"`
	UserReceivedAccount string              `json:"user_received_account"`
	SuccessTime         time.Time           `json:"success_time"`
}

type RefundNotifyResource

type RefundNotifyResource struct {
	Algorithm      string `json:"algorithm"`
	Ciphertext     string `json:"ciphertext"`
	Nonce          string `json:"nonce"`
	AssociatedData string `json:"associated_data"`
	OriginalType   string `json:"original_type"`
}

type RefundNotifyResp

type RefundNotifyResp struct {
	*RefundNotify
	Decryption *RefundNotifyDecryption `json:"decryption"`
}

type RefundReq

type RefundReq struct {
	TradeType     TradeType     `json:"-"`
	Amount        *RefundAmount `json:"amount"`                   // 订单金额信息
	SubMchid      string        `json:"sub_mchid"`                // 微信支付分配二级商户的商户号
	SpAppid       string        `json:"sp_appid"`                 // 电商平台在微信公众平台申请服务号对应的APPID,申请商户功能的时候微信支付会配置绑定关系
	SubAppid      string        `json:"sub_appid,omitempty"`      // 二级商户在微信申请公众号成功后分配的帐号ID,需要电商平台侧配置绑定关系才能传参
	TransactionID string        `json:"transaction_id,omitempty"` // 原支付交易对应的微信订单号
	OutTradeNo    string        `json:"out_trade_no,omitempty"`   // 原支付交易对应的商户订单号
	OutRefundNo   string        `json:"out_refund_no"`            // 商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@,同一退款单号多次请求只退一笔。
	Reason        string        `json:"reason,omitempty"`         // 若商户传入,会在下发给用户的退款消息中体现退款原因
	NotifyURL     string        `json:"notify_url,omitempty"`     // 异步接收微信支付退款结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数。 如果参数中传了notify_url,则商户平台上配置的回调地址将不会生效,优先回调当前传的地址。
}

type RefundResp

type RefundResp struct {
	Amount          *RefundAmountInfo  `json:"amount"`           // 订单金额信息
	RefundID        string             `json:"refund_id"`        // 微信支付退款订单号
	OutRefundNo     string             `json:"out_refund_no"`    // 商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔。
	Currency        string             `json:"currency"`         // 符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY
	CreateTime      time.Time          `json:"create_time"`      // 退款受理时间
	PromotionDetail []*PromotionDetail `json:"promotion_detail"` // 优惠退款功能信息
}

type ReturnProfitSharingReq

type ReturnProfitSharingReq struct {
	Amount      int64  `json:"amount"`
	SubMchid    string `json:"sub_mchid"`              // 分账出资的电商平台二级商户,填写微信支付分配的商户号
	OrderID     string `json:"order_id,omitempty"`     // 微信分账单号,微信系统返回的唯一标识。微信分账单号和商户分账单号二选一填写,与OutOrderNo二选一
	OutOrderNo  string `json:"out_order_no,omitempty"` // 商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次
	OutReturnNo string `json:"out_return_no"`          // 此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一
	ReturnMchid string `json:"return_mchid"`           // 只能对原分账请求中成功分给商户接收方进行回退
	Description string `json:"description"`            // 需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额
}

type ReturnProfitSharingResp

type ReturnProfitSharingResp struct {
	Amount      int64     `json:"amount"`        // 需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额
	SubMchid    string    `json:"sub_mchid"`     // 分账出资的电商平台二级商户,填写微信支付分配的商户号
	OrderID     string    `json:"order_id"`      // 原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 微信分账单号与商户分账单号二选一填写
	OutOrderNo  string    `json:"out_order_no"`  // 商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次
	OutReturnNo string    `json:"out_return_no"` // 此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 只能是数字、大小写字母_-*@ ,同一回退单号多次请求等同一次
	ReturnMchid string    `json:"return_mchid"`  // 只能对原分账请求中成功分给商户接收方进行回退
	ReturnNo    string    `json:"return_no"`     // 微信分账回退单号,微信系统返回的唯一标识
	Result      string    `json:"result"`        // 如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果,枚举值:PROCESSING:处理中 SUCCESS:已成功 FAIL:已失败 注意:如果返回为处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险 在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败
	FailReason  string    `json:"fail_reason"`   // 回退失败的原因,此字段仅回退结果为FAIL时存在,枚举值: ACCOUNT_ABNORMAL:分账接收方账户异常 TIME_OUT_CLOSED::超时关单
	FinishTime  time.Time `json:"finish_time"`   // 分账回退完成时间,遵循RFC3339标准格式 格式为YYYY-MM-DDTHH:mm:ss:sss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss:sss表示时分秒毫秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。
}

type SceneInfo

type SceneInfo struct {
	DeviceId      string `json:"device_id,omitempty"` // 商户端设备号,必填:否
	PayerClientIp string `json:"payer_client_ip"`     // 用户终端IP,必填:是
}

合单支付场景信息

type SubOrder

type SubOrder struct {
	ProfitSharing bool            `json:"profit_sharing"`   // 是否指定分账
	Amount        *SubOrderAmount `json:"amount"`           // 订单金额,必填:是
	Mchid         string          `json:"mchid"`            // 子单商户号,必填:是
	Attach        string          `json:"attach"`           // 附加信息,必填:是
	OutTradeNo    string          `json:"out_trade_no"`     // 子单商户订单号
	SubMchid      string          `json:"sub_mchid"`        // 子单发起方商户号,必须与发起方appid有绑定关系
	Detail        string          `json:"detail,omitempty"` // 商品详细描述(商品列表)
	Description   string          `json:"description"`      //商品简单描述。需传入应用市场上的APP名字-实际商品名称,天天爱消除-游戏充值
}

合单支付子单信息

type SubOrderAmount

type SubOrderAmount struct {
	TotalAmount int64  `json:"total_amount"` // 子单金额,单位为分
	Currency    string `json:"currency"`     // 符合ISO 4217标准的三位字母代码,人民币:CNY
}

订单金额

type TradeType

type TradeType int8
const (
	TradeTypeApp TradeType
	TradeTypeJsApi
	TradeTypeXCX
)

type WithdrawFundReq

type WithdrawFundReq struct {
	Amount       int64  `json:"amount"`              // 提现金额(单位:分)
	SubMchid     string `json:"sub_mchid"`           // 电商平台二级商户号,由微信支付生成并下发。
	OutRequestNo string `json:"out_request_no"`      // 商户提现单号,必须是字母数字
	Remark       string `json:"remark,omitempty"`    // 商户对提现单的备注
	BankMemo     string `json:"bank_memo,omitempty"` // 展示在收款银行系统中的附言,数字、字母最长32个汉字(能否成功展示依赖银行系统支持)
}

type WithdrawFundResp

type WithdrawFundResp struct {
	SubMchid     string `json:"sub_mchid"`      // 电商平台二级商户号,由微信支付生成并下发。
	WithdrawID   string `json:"withdraw_id"`    // 电商平台提交二级商户提现申请后,由微信支付返回的申请单号,作为查询申请状态的唯一标识
	OutRequestNo string `json:"out_request_no"` // 商户提现单号
}

Jump to

Keyboard shortcuts

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