Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notify ¶
Notify 回调
func (*Notify) DecryptReqInfo ¶
func (notify *Notify) DecryptReqInfo(result *RefundedResult) (*RefundedReqInfo, error)
DecryptReqInfo 对退款结果进行解密
func (*Notify) PaidVerifySign ¶
func (notify *Notify) PaidVerifySign(notifyRes PaidResult) bool
PaidVerifySign 支付成功结果验签
type PaidResult ¶
type PaidResult struct {
ReturnCode *string `xml:"return_code"`
ReturnMsg *string `xml:"return_msg"`
AppID *string `xml:"appid" json:"appid"`
MchID *string `xml:"mch_id"`
DeviceInfo *string `xml:"device_info"`
NonceStr *string `xml:"nonce_str"`
Sign *string `xml:"sign"`
SignType *string `xml:"sign_type"`
ResultCode *string `xml:"result_code"`
ErrCode *string `xml:"err_code"`
ErrCodeDes *string `xml:"err_code_des"`
OpenID *string `xml:"openid"`
IsSubscribe *string `xml:"is_subscribe"`
TradeType *string `xml:"trade_type"`
TradeState *string `xml:"trade_state"`
BankType *string `xml:"bank_type"`
TotalFee *int `xml:"total_fee"`
SettlementTotalFee *int `xml:"settlement_total_fee"`
FeeType *string `xml:"fee_type"`
CashFee *string `xml:"cash_fee"`
CashFeeType *string `xml:"cash_fee_type"`
CouponFee *int `xml:"coupon_fee"`
CouponCount *int `xml:"coupon_count"`
// coupon_type_$n 这里只声明 3 个,如果有更多的可以自己组合
CouponType0 *string `xml:"coupon_type_0"`
CouponType1 *string `xml:"coupon_type_1"`
CouponType2 *string `xml:"coupon_type_2"`
CouponID0 *string `xml:"coupon_id_0"`
CouponID1 *string `xml:"coupon_id_1"`
CouponID2 *string `xml:"coupon_id_2"`
CouponFee0 *string `xml:"coupon_fee_0"`
CouponFee1 *string `xml:"coupon_fee_1"`
CouponFee2 *string `xml:"coupon_fee_2"`
TransactionID *string `xml:"transaction_id"`
OutTradeNo *string `xml:"out_trade_no"`
Attach *string `xml:"attach"`
TimeEnd *string `xml:"time_end"`
}
PaidResult 下单回调
type RefundedReqInfo ¶
type RefundedReqInfo struct {
TransactionID *string `xml:"transaction_id"`
OutTradeNO *string `xml:"out_trade_no"`
RefundID *string `xml:"refund_id"`
OutRefundNO *string `xml:"out_refund_no"`
TotalFee *int `xml:"total_fee"`
SettlementTotalFee *int `xml:"settlement_total_fee"`
RefundFee *int `xml:"refund_fee"`
SettlementRefundFee *int `xml:"settlement_refund_fee"`
RefundStatus *string `xml:"refund_status"`
SuccessTime *string `xml:"success_time"`
RefundRecvAccount *string `xml:"refund_recv_accout"`
RefundAccount *string `xml:"refund_account"`
RefundRequestSource *string `xml:"refund_request_source"`
}
RefundedReqInfo 退款结果(明文)
type RefundedResp ¶
type RefundedResp struct {
ReturnCode string `xml:"return_code"`
ReturnMsg string `xml:"return_msg"`
}
RefundedResp 消息通知返回
Click to show internal directories.
Click to hide internal directories.