Documentation ¶
Index ¶
- Constants
- func GetRandomString(length int) string
- func StringMapJointByDictionaryOrder(data map[string]string) (str string)
- func ToKeyValueStr(v interface{}) string
- func WeChatPaySignHMACSHA256(v interface{}, apikey string) string
- func WeChatPaySignHMACSHA256ByMap(data map[string]string, apikey string) string
- func WeChatPaySignHMACSHA256ByString(data string, apikey string) string
- func WeChatPaySignMd5WithString(data string, apikey string) string
- func WeChatPaySignMd5WithStringMap(data map[string]string, apikey string) string
- type Client
- type MchInfo
- type Option
- type OrderQueryReq
- type PayNotifyInfo
- type PayNotifyRsp
- type SceneInfo
- type StringMap
- type UnifiedOrderReq
Constants ¶
View Source
const (
UnifiedOrderUrl = "/pay/unifiedorder"
)
Variables ¶
This section is empty.
Functions ¶
func GetRandomString ¶
func ToKeyValueStr ¶
func ToKeyValueStr(v interface{}) string
func WeChatPaySignHMACSHA256 ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) OrderQuery ¶
func (*Client) UnifiedOrder ¶
func (c *Client) UnifiedOrder(reqS *UnifiedOrderReq) (rsp StringMap, err error)
type OrderQueryReq ¶
type OrderQueryReq struct { Appid string `xml:"appid"` MchId string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` OutTradeNo string `xml:"out_trade_no,omitempty"` Sign string `xml:"sign"` SignType string `xml:"sign_type"` SubAppid string `xml:"sub_appid,omitempty"` SubMchId string `xml:"sub_mch_id,omitempty"` TransactionId string `xml:"transaction_id,omitempty"` }
type PayNotifyInfo ¶
type PayNotifyInfo struct { Appid string `xml:"appid"` Attach string `xml:"attach,omitempty"` BankType string `xml:"bank_type"` CashFee int `xml:"cash_fee"` CashFeeType string `xml:"cash_fee_type,omitempty"` CouponCount int `xml:"coupon_count,omitempty"` CouponFee int `xml:"coupon_fee,omitempty"` DeviceInfo string `xml:"device_info,omitempty"` ErrCode string `xml:"err_code,omitempty"` ErrCodeDes string `xml:"err_code_des,omitempty"` FeeType string `xml:"fee_type,omitempty"` IsSubscribe string `xml:"is_subscribe"` MchId string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` OutTradeNo string `xml:"out_trade_no"` Openid string `xml:"openid"` ResultCode string `xml:"result_code,omitempty"` SettlementTotalFee int `xml:"settlement_total_fee,omitempty"` Sign string `xml:"sign"` SignType string `xml:"sign_type"` TotalFee int `xml:"total_fee"` TimeEnd string `xml:"time_end"` TradeType string `xml:"trade_type"` TransactionId string `xml:"transaction_id"` }
type PayNotifyRsp ¶
type UnifiedOrderReq ¶
type UnifiedOrderReq struct { Appid string `xml:"appid"` Attach string `xml:"attach,omitempty"` Body string `xml:"body"` Detail string `xml:"detail,omitempty"` DeviceInfo string `xml:"device_info,omitempty"` GoodsTag string `xml:"goods_tag,omitempty"` FeeType string `xml:"fee_type,omitempty"` LimitPay string `xml:"limit_pay,omitempty"` MchId string `xml:"mch_id"` NonceStr string `xml:"nonce_str"` NotifyUrl string `xml:"notify_url"` Openid string `xml:"openid,omitempty"` OutTradeNo string `xml:"out_trade_no"` ProductId string `xml:"product_id,omitempty"` ProfitSharing string `xml:"profit_sharing,omitempty"` Receipt string `xml:"receipt,omitempty"` SceneInfo SceneInfo `xml:"scene_info,omitempty"` Sign string `xml:"sign"` SignType string `xml:"sign_type,omitempty"` SpbillCreateIp string `xml:"spbill_create_ip"` SubAppid string `xml:"sub_appid,omitempty"` SubMchId string `xml:"sub_mch_id,omitempty"` SubOpenid string `xml:"sub_openid,omitempty"` TimeExpire string `xml:"time_expire,omitempty"` TimeStart string `xml:"time_start,omitempty"` TotalFee int `xml:"total_fee"` TradeType string `xml:"trade_type"` }
Click to show internal directories.
Click to hide internal directories.