Documentation ¶
Index ¶
- Constants
- type Base
- type BaseResponse
- type CancelTrade
- type CloseTrade
- type CommentQuery
- type Config
- type Coupon
- type CouponQuery
- type Gateway
- type GroupRedPack
- type PayApp
- type PayBar
- type PayLite
- type PayPub
- type PayQr
- type PayWap
- type QueryRefund
- type QueryTrade
- type Refund
- type WxNotifyPayResponse
- type WxNotifyRefundResponse
Constants ¶
View Source
const NonceLen = 32
View Source
const SignTypeMd5 = "MD5"
View Source
const SignTypeSha = "HMAC-SHA256"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResponse ¶
type BaseResponse struct {
Resp string
}
func NewBaseResponse ¶
func NewBaseResponse(resp string) *BaseResponse
func (*BaseResponse) ToJson ¶
func (w *BaseResponse) ToJson() (string, error)
func (*BaseResponse) ToMap ¶
func (w *BaseResponse) ToMap() (map[string]interface{}, error)
func (*BaseResponse) ToXml ¶
func (w *BaseResponse) ToXml() (string, error)
type CancelTrade ¶
type CancelTrade struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11 *
func (CancelTrade) BuildParams ¶
func (w CancelTrade) BuildParams(params map[string]string) map[string]string
func (CancelTrade) Request ¶
func (w CancelTrade) Request(params map[string]string) *payloads.UnionPaymentResult
type CloseTrade ¶
type CloseTrade struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11 *
func (CloseTrade) BuildParams ¶
func (w CloseTrade) BuildParams(params map[string]string) map[string]string
func (CloseTrade) Request ¶
func (w CloseTrade) Request(params map[string]string) *payloads.UnionPaymentResult
type CommentQuery ¶
type CommentQuery struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11 *
func (CommentQuery) BuildParams ¶
func (w CommentQuery) BuildParams(params map[string]string) map[string]string
func (CommentQuery) Request ¶
func (w CommentQuery) Request(params map[string]string) *payloads.UnionPaymentResult
type Config ¶
type Config struct { UseSandbox bool `json:"use_sandbox" yaml:"use_sandbox"` UseBackup bool `json:"use_backup" yaml:"use_backup"` AppId string `json:"app_id" yaml:"app_id"` SubAppId string `json:"sub_app_id" yaml:"sub_app_id"` SubMchId string `json:"sub_mch_id" yaml:"sub_mch_id"` MchId string `json:"mch_id" yaml:"mch_id"` Md5Key string `json:"md5_key" yaml:"md5_key"` AppCertPem string `json:"app_cert_pem" yaml:"app_cert_pem"` AppKeyPem string `json:"app_key_pem" yaml:"app_key_pem"` SignType string `json:"sign_type" yaml:"sign_type"` LimitPay []string `json:"limit_pay" yaml:"limit_pay"` FeeType string `json:"fee_type" yaml:"fee_type"` ReturnRaw bool `json:"return_raw" yaml:"return_raw"` NotifyUrl string `json:"notify_url" yaml:"notify_url"` RedirectUrl string `json:"redirect_url" yaml:"redirect_url"` SandboxKey string `json:"sandbox_key" yaml:"sandbox_key"` }
func NewConfigWithJson ¶
func NewConfigWithYaml ¶
func (Config) CheckConfig ¶
func (Config) ParseConfig ¶
func (c Config) ParseConfig() interface{}
type Coupon ¶
type Coupon struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11 *
type CouponQuery ¶
type CouponQuery struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11 *
func (CouponQuery) BuildParams ¶
func (w CouponQuery) BuildParams(params map[string]string) map[string]string
func (CouponQuery) Request ¶
func (w CouponQuery) Request(params map[string]string) *payloads.UnionPaymentResult
type Gateway ¶
type Gateway struct {
Base *Base
}
func (*Gateway) Request ¶
func (w *Gateway) Request(api payloads.UnionPaymentApi, params map[string]string) *payloads.UnionPaymentResult
type GroupRedPack ¶
type GroupRedPack struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11 *
func (GroupRedPack) BuildParams ¶
func (w GroupRedPack) BuildParams(params map[string]string) map[string]string
func (GroupRedPack) Request ¶
func (w GroupRedPack) Request(params map[string]string) *payloads.UnionPaymentResult
type PayApp ¶
type PayApp struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2020/04/11
- @modified: 2020/04/11 *
type PayPub ¶
type PayPub struct {
Base *Base
}
func (PayPub) ParseResult ¶
func (w PayPub) ParseResult(response payloads.IGatewayResponse) map[string]string
type QueryRefund ¶
type QueryRefund struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @created : 2021/03/13 *
func (QueryRefund) BuildParams ¶
func (w QueryRefund) BuildParams(params map[string]string) map[string]string
func (QueryRefund) Request ¶
func (w QueryRefund) Request(params map[string]string) *payloads.UnionPaymentResult
type QueryTrade ¶
type QueryTrade struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @created : 2021/03/13 *
func (QueryTrade) BuildParams ¶
func (w QueryTrade) BuildParams(params map[string]string) map[string]string
func (QueryTrade) Request ¶
func (w QueryTrade) Request(params map[string]string) *payloads.UnionPaymentResult
type Refund ¶
type Refund struct {
Base *Base
}
*
- @package gateway.wechat
- @author : Benny
- @email : benny_a8@qq.com
- @date : 2021/03/13 *
type WxNotifyPayResponse ¶
type WxNotifyPayResponse struct { AppId string `json:"appid" xml:"appid"` Attach string `json:"attach" xml:"attach"` BankType string `json:"bank_type" xml:"bank_type"` CouponCount string `json:"coupon_count" xml:"coupon_count"` CouponFee string `json:"coupon_fee" xml:"coupon_fee"` CouponId string `json:"coupon_id" xml:"coupon_id"` CouponType string `json:"coupon_type" xml:"coupon_type"` IsSubscribe string `json:"is_subscribe" xml:"is_subscribe"` MchId string `json:"mch_id" xml:"mch_id"` NonceStr string `json:"nonce_str" xml:"nonce_str"` Openid string `json:"openid" xml:"openid"` OutTradeNo string `json:"out_trade_no" xml:"out_trade_no"` ResultCode string `json:"result_code" xml:"result_code"` ReturnCode string `json:"return_code" xml:"return_code"` Sign string `json:"sign" xml:"sign"` TimeEnd string `json:"time_end" xml:"time_end"` TotalFee string `json:"total_fee" xml:"total_fee"` TradeType string `json:"trade_type" xml:"trade_type"` TransactionId string `json:"transaction_id" xml:"transaction_id"` }
type WxNotifyRefundResponse ¶
Click to show internal directories.
Click to hide internal directories.