Documentation
¶
Index ¶
- type AccessToken
- type PushInfo
- type Ticket
- type TokenXML
- type WXDetail
- type WXGoodsDetail
- type WxOrderResult
- type WxService
- func (entity WxService) ChangeWxConfig(DB *gorm.DB, ID uint64, Value dao.WxConfig) error
- func (entity WxService) CloseOrder(OrderNo string, OID uint64) (Success bool, Message string)
- func (entity WxService) Decrypt(encryptedData, session_key, iv_text string) (bool, string)
- func (entity WxService) GetAccessToken(WxConfig dao.WxConfig) string
- func (entity WxService) GetTransfersInfo(transfers dao.Transfers) (Success bool)
- func (entity WxService) GetWXAConfig(prepay_id string, WxConfig dao.WxConfig) (outData map[string]string)
- func (entity WxService) INComeNotify(slUser dao.User, itemName string, timeText string, typeText string) *result.ActionResult
- func (entity WxService) MPOrder(OrderNo string, title, description string, ogs []dao.OrdersGoods, ...) (Success result.ActionResultCode, Message string, result WxOrderResult)
- func (entity WxService) MWQRCodeTemp(OID uint64, UserID uint64, qrtype, params string) *result.ActionResult
- func (entity WxService) MiniProgram() dao.WxConfig
- func (entity WxService) MiniProgramInfo(Code, AppID, AppSecret string) (err error, OpenID, SessionKey string)
- func (entity WxService) MiniWeb() dao.WxConfig
- func (entity WxService) MwGetTicket(WxConfig dao.WxConfig) string
- func (entity WxService) MwGetWXJSConfig(url string, OID uint64) map[string]interface{}
- func (entity WxService) NewOrderNotify(Order dao.Orders, ogs []dao.OrdersGoods) *result.ActionResult
- func (entity WxService) NewUserJoinNotify(NewUser dao.User, notifyUser dao.User) *result.ActionResult
- func (entity WxService) Order(OrderNo string, title, description string, detail, openid string, IP string, ...) (Success result.ActionResultCode, Message string, wxResult WxOrderResult)
- func (entity WxService) OrderDeliveryNotify(Order dao.Orders, ogs []dao.OrdersGoods) *result.ActionResult
- func (entity WxService) OrderQuery(OrderNo string) (Success bool, Result util.Map)
- func (entity WxService) Refund(order dao.Orders, ordersPackage dao.OrdersPackage, ...) (Success bool, Message string)
- func (entity WxService) SendUniformMessage(sendData map[string]interface{}) (*result.ActionResult, int)
- func (entity WxService) SendWXMessage(sendData map[string]interface{}) *result.ActionResult
- func (entity WxService) SignatureVerification(dataMap util.Map) bool
- func (entity WxService) Transfers(transfers dao.Transfers) (Success bool, Message string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type WXDetail ¶
type WXDetail struct {
Goods_detail []WXGoodsDetail `json:"goods_detail"`
}
type WXGoodsDetail ¶
type WxOrderResult ¶
type WxOrderResult struct { Return_code string `xml:"return_code"` Return_msg string `xml:"return_msg"` Appid string `xml:"appid"` Mch_id string `xml:"mch_id"` Nonce_str string `xml:"nonce_str"` Sign string `xml:"sign"` Result_code string `xml:"result_code"` Prepay_id string `xml:"prepay_id"` Trade_type string `xml:"trade_type"` Err_code_des string `xml:"err_code_des"` }
type WxService ¶
type WxService struct { dao.BaseDao //Admin service.AdminService //Goods goods.GoodsService User user.UserService //Orders order.OrdersService Organization company.OrganizationService }
func (WxService) ChangeWxConfig ¶
if item.ID == 0 { err = DB.Create(item).Error glog.Error(err) return item } else { return item } }
func (WxService) CloseOrder ¶
关闭订单
func (WxService) GetAccessToken ¶
func (WxService) GetTransfersInfo ¶
查询提现接口
func (WxService) GetWXAConfig ¶
func (WxService) INComeNotify ¶
func (entity WxService) INComeNotify(slUser dao.User, itemName string, timeText string, typeText string) *result.ActionResult
收入提醒
@slUser 收入的用户
func (WxService) MPOrder ¶
func (entity WxService) MPOrder(OrderNo string, title, description string, ogs []dao.OrdersGoods, openid string, IP string, Money uint64, attach string) (Success result.ActionResultCode, Message string, result WxOrderResult)
func (WxService) MWQRCodeTemp ¶
func (entity WxService) MWQRCodeTemp(OID uint64, UserID uint64, qrtype, params string) *result.ActionResult
func (entity WxService) MiniProgramByAppIDAndMchID(AppID, MchID string) dao.WxConfig { var wx dao.WxConfig err := dao.Orm().Model(&dao.WxConfig{}).Where("AppID=? and MchID=?", AppID, MchID).First(&wx).Error glog.Error(err) return wx }
func (entity WxService) GetWxConfig(ID uint64) dao.WxConfig { var wx dao.WxConfig err := dao.Orm().Model(&dao.WxConfig{}).Where("ID=?", ID).First(&wx).Error glog.Error(err) return wx }
func (WxService) MiniProgram ¶
func (self WxService) WX() WxConfig {
return WxConfig{AppID: "wx037d3b26b2ba34b2", AppSecret: "c930d5b6a337c6bad9b41556cdcb94d2", Token: "", EncodingAESKey: "", MchID: "1253136001", PayKey: "6af34073b83d6f8a4f35289b92226f20"} }
小程序
func (WxService) MiniProgramInfo ¶
func (WxService) MwGetWXJSConfig ¶
func (WxService) NewOrderNotify ¶
func (entity WxService) NewOrderNotify(Order dao.Orders, ogs []dao.OrdersGoods) *result.ActionResult
新订单
func (WxService) NewUserJoinNotify ¶
func (entity WxService) NewUserJoinNotify(NewUser dao.User, notifyUser dao.User) *result.ActionResult
新用户加入,绑定上下级关系
func (WxService) OrderDeliveryNotify ¶
func (entity WxService) OrderDeliveryNotify(Order dao.Orders, ogs []dao.OrdersGoods) *result.ActionResult
发货通知
func (WxService) OrderQuery ¶
订单查询
func (WxService) Refund ¶
func (entity WxService) Refund(order dao.Orders, ordersPackage dao.OrdersPackage, PayMoney, RefundMoney uint64, Desc string, Type uint64) (Success bool, Message string)
退款
func (WxService) SendUniformMessage ¶
func (entity WxService) SendUniformMessage(sendData map[string]interface{}) (*result.ActionResult, int)
func (WxService) SendWXMessage ¶
func (entity WxService) SendWXMessage(sendData map[string]interface{}) *result.ActionResult
func (WxService) SignatureVerification ¶
Click to show internal directories.
Click to hide internal directories.