Documentation
¶
Index ¶
- Constants
- func GetAccessToken() (access_token string, err error)
- func GetApiTicket() (ticket string, err error)
- func GetJsTicket() (ticket string, err error)
- func OnSelectData(open_id, order_id string) (int, message.MessageBody)
- func RefundPay(open_id, order_id, refund_no string, total_fee, refund_fee int) (bool, message.MessageBody)
- func SmallAppOauth(jscode string) string
- func SmallAppUnifiedorder(open_id string, price int, price_body, order_id, client_ip string) message.MessageBody
- func WxEnterprisePay(open_id, trade_no, desc, ipAddr string, amount int) bool
- type ApiTicket
- type Gocache
- type UserInfo
Constants ¶
View Source
const ( GETTICKETURL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=wx_card&access_token=" GETJSURL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?type=jsapi&access_token=" )
View Source
const ( PAY_SUCCESS = 1 //支付成功 PAY_REFUND = 2 //转入退款 PAY_CLOSED = 3 //已关闭 PAY_NOTPAY = 4 //未支付 PAY_REVOKED = 5 //已撤销 PAY_USERPAYING = 6 //支付中 PAY_ERROR = -1 //支付失败 )
Variables ¶
This section is empty.
Functions ¶
func OnSelectData ¶
统一查询接口 open_id:用户唯一标识 order_id : 商户订单号
func RefundPay ¶
func RefundPay(open_id, order_id, refund_no string, total_fee, refund_fee int) (bool, message.MessageBody)
申请退款 open_id:用户唯一标识 order_id : 商户订单号 refund_no:商户退款单号 total_fee: 订单总金额 分 refund_fee: 退款总金额 分
func SmallAppUnifiedorder ¶
func SmallAppUnifiedorder(open_id string, price int, price_body, order_id, client_ip string) message.MessageBody
小程序统一下单接口 open_id:用户唯一标识 price : 预支付价钱 price_body : 支付描述 order_id : 商户订单号
func WxEnterprisePay ¶
企业付款 open_id:用户唯一标识 trade_no : 商户订单号 desc : 操作说明 amount:付款金额 分
Types ¶
type Gocache ¶
type Gocache struct {
// contains filtered or unexported fields
}
Memcache struct contains *memcache.Client
type UserInfo ¶
type UserInfo struct { OpenID string `json:"openid"` Nickname string `json:"nickname"` Sex int32 `json:"sex"` Province string `json:"province"` City string `json:"city"` Country string `json:"country"` HeadImgURL string `json:"headimgurl"` Privilege []string `json:"privilege"` Unionid string `json:"unionid"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.