Versions in this module Expand all Collapse all v0 v0.0.1 Aug 6, 2020 Changes in this version + var ErrNotifyDataIsEmpty = errors.New("notify data is empty") + func Contains(strs []string, key string) bool + func MD5(strs ...string) string + func SHA1(b []byte) []byte + type ConsumeQueryResponse struct + AccNo string + AccessType string + CertID string + CurrencyCode string + Encoding string + IssuerIdentifyMode string + MerID string + OrderID string + OrigRespCode string + OrigRespMsg string + PayCardType string + PayType string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SettleAmt string + SettleCurrencyCode string + SettleDate string + SignMethod string + Signature string + TraceNo string + TraceTime string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type ConsumeRefundNotifyResponse struct + AccessType string + BizType string + CertID string + CurrencyCode string + Encoding string + MerID string + OrderID string + OrigQryID string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SettleAmt string + SettleCurrencyCode string + SettleDate string + SignMethod string + Signature string + TraceNo string + TraceTime string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type ConsumeRefundResponse struct + AccessType string + BizType string + CertID string + Encoding string + MerID string + OrderID string + OrigQryID string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SignMethod string + Signature string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type ConsumeUndoNotifyResponse struct + AccessType string + BizType string + CertID string + CurrencyCode string + Encoding string + MerID string + OrderID string + OrigQryID string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SettleAmt string + SettleCurrencyCode string + SettleDate string + SignMethod string + Signature string + TraceNo string + TraceTime string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type ConsumeUndoResponse struct + AccessType string + BizType string + CertID string + Encoding string + MerID string + OrderID string + OrigQryID string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SignMethod string + Signature string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type FrontConsumeNotifyResponse struct + AccNo string + AccessType string + BindID string + BizType string + CertID string + CurrencyCode string + Encoding string + ExchangeDate string + ExchangeRate string + MerID string + OrderID string + PayCardIssueName string + PayCardNo string + PayCardType string + PayType string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SettleAmt string + SettleCurrencyCode string + SettleDate string + SignMethod string + Signature string + TraceNo string + TraceTime string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type FrontConsumeReturnResponse struct + AccNo string + AccessType string + BizType string + CertID string + CurrencyCode string + Encoding string + MerID string + OrderID string + PayCardType string + PayType string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SettleAmt string + SettleCurrencyCode string + SettleDate string + SignMethod string + Signature string + TN string + TraceNo string + TraceTime string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type KVpair struct + K string + V string + type KVpairs []KVpair + func GenKVpairs(paramsKeyMap map[string]bool, initParams map[string]string, skipKey ...string) (kvs KVpairs, err error) + func (t KVpairs) Join(sep string) string + func (t KVpairs) Len() int + func (t KVpairs) Less(i, j int) bool + func (t KVpairs) RemoveEmpty() KVpairs + func (t KVpairs) Sort() KVpairs + func (t KVpairs) Swap(i, j int) + type MobilePaymentNotifyResponse struct + AccNo string + AccessType string + BizType string + CertID string + CurrencyCode string + Encoding string + MerID string + OrderID string + PayCardIssueName string + PayCardNo string + PayCardType string + PayType string + QueryID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SettleAmt string + SettleCurrencyCode string + SettleDate string + SignMethod string + Signature string + TraceNO string + TraceTime string + TxnAmt string + TxnSubType string + TxnTime string + TxnType string + Version string + type MobilePaymentResponse struct + AccessType string + BizType string + CertID string + Encoding string + MerID string + OrderID string + ReqReserved string + Reserved string + RespCode string + RespMsg string + SignMethod string + Signature string + TN string + TxnSubType string + TxnTime string + TxnType string + Version string + type UnionPay struct + func NewPayment(mchID, pubPath, priPath, certPath string) (up *UnionPay) + func (up *UnionPay) ConsumeQuery(orderID, queryID, txnTime, reserved string) (resp *ConsumeQueryResponse, err error) + func (up *UnionPay) ConsumeRefund(orderID, returnURL string, amount int64, ...) (resp *ConsumeRefundResponse, err error) + func (up *UnionPay) ConsumeRefundNotify(req *http.Request) (resp *ConsumeRefundNotifyResponse, err error) + func (up *UnionPay) ConsumeUndo(orderID, returnURL string, amount int64, ...) (resp *ConsumeUndoResponse, err error) + func (up *UnionPay) ConsumeUndoNotify(req *http.Request) (resp *ConsumeUndoNotifyResponse, err error) + func (up *UnionPay) FrontConsume(orderID string, amount int64, returnURL, notifyURL string, ...) (html string, err error) + func (up *UnionPay) FrontConsumeNotify(req *http.Request) (resp *FrontConsumeNotifyResponse, err error) + func (up *UnionPay) FrontConsumeReturn(req *http.Request) (resp *FrontConsumeReturnResponse, err error) + func (up *UnionPay) MobilePayment(orderID string, amount int64, notifyURL string, extraParams map[string]string) (resp *MobilePaymentResponse, err error) + func (up *UnionPay) MobilePaymentNotify(req *http.Request) (resp *MobilePaymentNotifyResponse, err error) + func (up *UnionPay) SetTestEnv(b bool) *UnionPay