Documentation ¶
Index ¶
- Constants
- func GetRandomString(length int) string
- func PrivateKeySignSHA256(signData string, key string) (sign string, err error)
- func RsaVerySignWithSHA256Base64(originalData, signData string, key string) (err error)
- func SHA256BAS64(signstr string, key *rsa.PrivateKey) (string, error)
- func Sign(method string, url string, timestamp string, nonce string, body []byte, ...) (sign string, err error)
- func Struct2mapJson(v interface{}) map[string]string
- func VerifySign(body, timestamp, nonceStr, sign, publicKey string) (err error)
- type Client
- func (c *Client) PayJsapi(req *PayJsapiReq) (rsp *PayJsapiRsp, err error)
- func (c *Client) PayJsapiOutTradeNoQuery(outTradeNo string) (rsp *PayJsapiOutTradeNoRsp, err error)
- func (c *Client) QueryUserCoupon(openid string, couponId string, appid string) (rsp *QueryUserCouponRsp, err error)
- func (c *Client) QueryUserCoupons(openid string, req *QueryUserCouponsReq) (rsp *QueryUserCouponsRsp, err error)
- func (c *Client) SendCouponStock(openid string, req *SendCouponStockReq) (rsp *SendCouponStockRsp, err error)
- func (c *Client) VehicleParkingParkings(req *VehicleParkingParkingsReq) (rsp *VehicleParkingParkingsRsp, err error)
- func (c *Client) VehicleParkingServicesFind(req *VehicleParkingServiceFindReq) (rsp *VehicleParkingServiceFindRsp, err error)
- func (c *Client) VehicleTransactionParking(req *VehicleTransactionsParkingReq) (rsp *VehicleTransactionsParkingRsp, err error)
- func (c *Client) VehicleTransactionsOutTradeNo(outTradeNo string, subMchId string) (rsp *VehicleTransactionsParkingRsp, err error)
- type MchInfo
- type Option
- type PayJsapiAmountInfo
- type PayJsapiOutTradeNoRsp
- type PayJsapiPayerInfo
- type PayJsapiReq
- type PayJsapiRsp
- type QueryUserCouponConsumeInformation
- type QueryUserCouponCutToMessage
- type QueryUserCouponGoodsDetail
- type QueryUserCouponNormalCouponInformation
- type QueryUserCouponReq
- type QueryUserCouponRsp
- type QueryUserCouponsReq
- type QueryUserCouponsRsp
- type RequestErr
- type SendCouponStockReq
- type SendCouponStockRsp
- type VehicleParkingParkingsReq
- type VehicleParkingParkingsRsp
- type VehicleParkingServiceFindReq
- type VehicleParkingServiceFindRsp
- type VehicleTransactionParkingPayer
- type VehicleTransactionsParkingAmount
- type VehicleTransactionsParkingInfo
- type VehicleTransactionsParkingPromotionDetail
- type VehicleTransactionsParkingReq
- type VehicleTransactionsParkingRsp
Constants ¶
View Source
const PC_BLACK = "BLACK"
View Source
const PC_BLUE = "BLUE"
plate color车牌颜色,枚举值: BLUE:蓝色 GREEN:绿色 YELLOW:黄色 BLACK:黑色 WHITE:白色 LIMEGREEN:黄绿色
View Source
const PC_GREEN = "GREEN"
View Source
const PC_LIMEGREEN = "LIMEGREEN"
View Source
const PC_WHITE = "WHITE"
View Source
const PC_YELLOW = "YELLOW"
View Source
const TS_ACCEPTED = "ACCEPTED"
View Source
const TS_PAY_FAIL = "PAY_FAIL"
View Source
const TS_REFUND = "REFUND"
View Source
const TS_SUCCESS = "SUCCESS"
trade state 枚举值: SUCCESS:支付成功 ACCEPTED:已接收,等待扣款 PAY_FAIL:支付失败(其他原因,如银行返回失败) REFUND:转入退款
View Source
const UR_N = "N"
View Source
const UR_Y = "Y"
user_repaid 枚举值: Y:用户已还款 N:用户未还款
View Source
const VS_BLOCKED = "BLOCKED"
View Source
const VS_NORMAL = "NORMAL"
state enum
Variables ¶
This section is empty.
Functions ¶
func GetRandomString ¶
func PrivateKeySignSHA256 ¶
func SHA256BAS64 ¶
func SHA256BAS64(signstr string, key *rsa.PrivateKey) (string, error)
func Struct2mapJson ¶ added in v0.6.25
func VerifySign ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) PayJsapi ¶ added in v0.6.25
func (c *Client) PayJsapi(req *PayJsapiReq) (rsp *PayJsapiRsp, err error)
func (*Client) PayJsapiOutTradeNoQuery ¶ added in v0.6.25
func (c *Client) PayJsapiOutTradeNoQuery(outTradeNo string) (rsp *PayJsapiOutTradeNoRsp, err error)
func (*Client) QueryUserCoupon ¶
func (*Client) QueryUserCoupons ¶ added in v0.6.25
func (c *Client) QueryUserCoupons(openid string, req *QueryUserCouponsReq) (rsp *QueryUserCouponsRsp, err error)
func (*Client) SendCouponStock ¶
func (c *Client) SendCouponStock(openid string, req *SendCouponStockReq) (rsp *SendCouponStockRsp, err error)
func (*Client) VehicleParkingParkings ¶ added in v0.6.25
func (c *Client) VehicleParkingParkings(req *VehicleParkingParkingsReq) (rsp *VehicleParkingParkingsRsp, err error)
创建停车入场
func (*Client) VehicleParkingServicesFind ¶ added in v0.6.25
func (c *Client) VehicleParkingServicesFind(req *VehicleParkingServiceFindReq) (rsp *VehicleParkingServiceFindRsp, err error)
查询车牌服务开通信息
func (*Client) VehicleTransactionParking ¶ added in v0.6.25
func (c *Client) VehicleTransactionParking(req *VehicleTransactionsParkingReq) (rsp *VehicleTransactionsParkingRsp, err error)
扣费受理
func (*Client) VehicleTransactionsOutTradeNo ¶ added in v0.6.25
func (c *Client) VehicleTransactionsOutTradeNo(outTradeNo string, subMchId string) (rsp *VehicleTransactionsParkingRsp, err error)
查询订单
type PayJsapiAmountInfo ¶ added in v0.6.25
type PayJsapiOutTradeNoRsp ¶ added in v0.6.25
type PayJsapiOutTradeNoRsp 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 PayJsapiPayerInfo `json:"payer"` }
type PayJsapiPayerInfo ¶ added in v0.6.25
type PayJsapiPayerInfo struct {
Openid string `json:"openid"`
}
type PayJsapiReq ¶ added in v0.6.25
type PayJsapiReq struct { Appid string `json:"appid"` Mchid string `json:"mchid"` Description string `json:"description"` OutTradeNo string `json:"out_trade_no"` TimeExpire string `json:"time_expire,omitempty"` Attach string `json:"attach,omitempty"` NotifyUrl string `json:"notify_url"` GoodsTag string `json:"goods_tag,omitempty"` Amount PayJsapiAmountInfo `json:"amount"` Payer PayJsapiPayerInfo `json:"payer"` }
type PayJsapiRsp ¶ added in v0.6.25
type PayJsapiRsp struct {
PrepayId string `json:"prepay_id"`
}
type QueryUserCouponReq ¶
type QueryUserCouponReq struct { }
type QueryUserCouponRsp ¶
type QueryUserCouponRsp struct { StockCreateMchId string `json:"stock_creator_mchid"` StockId string `json:"stock_id"` CouponId string `json:"coupon_id"` CutToMessage QueryUserCouponCutToMessage `json:"cut_to_message"` CouponName string `json:"coupon_name"` Status string `json:"status"` Description string `json:"description"` CreateTime string `json:"create_time"` CouponType string `json:"coupon_type"` NoCash bool `json:"no_cash"` AvailableBeginTime string `json:"available_begin_time"` AvailableEndTime string `json:"available_end_time"` Singleitem bool `json:"singleitem"` NormalCouponInformation QueryUserCouponNormalCouponInformation `json:"normal_coupon_information"` ConsumeInformation QueryUserCouponConsumeInformation `json:"consume_information"` GoodsDetail QueryUserCouponGoodsDetail `json:"goods_detail"` }
type QueryUserCouponsReq ¶ added in v0.6.25
type QueryUserCouponsReq struct { Appid string `json:"appid"` StockId string `json:"stock_id,omitempty"` Status string `json:"status,omitempty"` CreatorMchId string `json:"creator_mchid,omitempty"` SenderMchId string `json:"sender_mchid,omitempty"` AvailableMchId string `json:"available_mchid,omitempty"` Offset uint32 `json:"offset,omitempty"` Limit uint32 `json:"limit,omitempty"` }
type QueryUserCouponsRsp ¶ added in v0.6.25
type QueryUserCouponsRsp struct { Data []QueryUserCouponRsp `json:"data"` TotalCount uint32 `json:"total_count"` Limit uint32 `json:"limit"` Offset uint32 `json:"offset"` }
type RequestErr ¶
type RequestErr struct { Code string `json:"code"` Message string `json:"message"` Field string `json:"field"` Value string `json:"value"` Issue string `json:"issue"` Detail interface{} `json:"detail"` ReqText string `json:"req_text"` }
func (*RequestErr) Error ¶
func (e *RequestErr) Error() string
type SendCouponStockReq ¶
type SendCouponStockRsp ¶
type SendCouponStockRsp struct {
CouponId string `json:"coupon_id"`
}
type VehicleParkingParkingsReq ¶ added in v0.6.25
type VehicleParkingParkingsReq struct { SubMchId string `json:"sub_mchid"` OutParkingNo string `json:"out_parking_no"` PlateNumber string `json:"plate_number"` PlateColor string `json:"plate_color"` NotifyUrl string `json:"notify_url"` StartTime string `json:"start_time"` ParkingName string `json:"parking_name"` FreeDuration int `json:"free_duration"` }
type VehicleParkingParkingsRsp ¶ added in v0.6.25
type VehicleParkingParkingsRsp struct { Id string `json:"id"` OutParkingNo string `json:"out_parking_no"` PlateNumber string `json:"plate_number"` PlateColor string `json:"plate_color"` StartTime string `json:"start_time"` ParkingName string `json:"parking_name"` FreeDuration int `json:"free_duration"` State string `json:"state"` BlockReason string `json:"block_reason"` }
type VehicleParkingServiceFindReq ¶ added in v0.6.25
type VehicleParkingServiceFindRsp ¶ added in v0.6.25
type VehicleTransactionParkingPayer ¶ added in v0.6.25
type VehicleTransactionsParkingAmount ¶ added in v0.6.25
type VehicleTransactionsParkingInfo ¶ added in v0.6.25
type VehicleTransactionsParkingInfo struct { ParkingId string `json:"parking_id"` PlateNumber string `json:"plate_number"` PlateColor string `json:"plate_color"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` ParkingName string `json:"parking_name"` ChargingDuration int `json:"charging_duration"` DeviceId string `json:"device_id"` }
type VehicleTransactionsParkingPromotionDetail ¶ added in v0.6.25
type VehicleTransactionsParkingPromotionDetail struct { CouponId string `json:"coupon_id"` Name string `json:"name"` Scope string `json:"scope"` Type string `json:"type"` StockId string `json:"stock_id"` Amount int `json:"amount"` WeChatPayContribute int `json:"wechatpay_contribute"` MerchantContribute int `json:"merchant_contribute"` OtherContribute int `json:"other_contribute"` Currency string `json:"currency"` }
type VehicleTransactionsParkingReq ¶ added in v0.6.25
type VehicleTransactionsParkingReq struct { Appid string `json:"appid"` SubAppid string `json:"sub_appid"` SubMchId string `json:"sub_mchid"` Description string `json:"description"` Attach string `json:"attach"` OutTradeNo string `json:"out_trade_no"` TradeScene string `json:"trade_scene"` GoodsTag string `json:"goods_tag"` NotifyUrl string `json:"notify_url"` ProfitSharing string `json:"profit_sharing"` Amount VehicleTransactionsParkingAmount `json:"amount"` ParkingInfo VehicleTransactionsParkingInfo `json:"parking_info"` }
type VehicleTransactionsParkingRsp ¶ added in v0.6.25
type VehicleTransactionsParkingRsp struct { Appid string `json:"appid"` SubAppid string `json:"sub_appid"` SubMchId string `json:"sub_mchid"` SpMchId string `json:"sp_mchid"` Description string `json:"description"` CreateTime string `json:"create_time"` OutTradeNo string `json:"out_trade_no"` TradeState string `json:"trade_state"` TradeStateDescription string `json:"trade_state_description"` SuccessTime string `json:"success_time"` BankType string `json:"bank_type"` UserRepaid string `json:"user_repaid"` Attach string `json:"attach"` TradeScene string `json:"trade_scene"` ParkingInfo VehicleTransactionsParkingInfo `json:"parking_info"` Payer VehicleTransactionParkingPayer `json:"payer"` Amount VehicleTransactionsParkingAmount `json:"amount"` PromotionDetail VehicleTransactionsParkingPromotionDetail `json:"promotion_detail"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.