Documentation ¶
Overview ¶
**************************************************
** @Desc : 处理下游请求的一些公用的逻辑 ** @Time : 2019/10/28 18:09 ** @Author : yuebin ** @File : base_gateway ** @Last Modified by : yuebin ** @Last Modified time: 2019/10/28 18:09 ** @Software: GoLand
***************************************************
**************************************************
** @Desc : This file for ... ** @Time : 2019/10/26 16:56 ** @Author : yuebin ** @File : error_gateway ** @Last Modified by : yuebin ** @Last Modified time: 2019/10/26 16:56 ** @Software: GoLand
***************************************************
**************************************************
** @Desc : 供下游订单状态查询和代付结果查询 ** @Time : 2019/11/6 13:59 ** @Author : yuebin ** @File : order_query ** @Last Modified by : yuebin ** @Last Modified time: 2019/11/6 13:59 ** @Software: GoLand
***************************************************
**************************************************
** @Desc : This file for ... ** @Time : 2019/12/5 14:05 ** @Author : yuebin ** @File : payfor_gateway ** @Last Modified by : yuebin ** @Last Modified time: 2019/12/5 14:05 ** @Software: GoLand
***************************************************
**************************************************
** @Desc : 下游请求扫码支付的处理逻辑 ** @Time : 2019/10/24 11:15 ** @Author : yuebin ** @File : gateway ** @Last Modified by : yuebin ** @Last Modified time: 2019/10/24 11:15 ** @Software: GoLand
***************************************************
**************************************************
** @Desc : 接受上游通道商的订单结果异步回调 ** @Time : 2019/11/22 23:27 ** @Author : yuebin ** @File : supplier_notify ** @Last Modified by : yuebin ** @Last Modified time: 2019/11/22 23:27 ** @Software: GoLand
***************************************************
Index ¶
- type BalanceResponse
- type BaseGateway
- func (c *BaseGateway) ChooseRoad()
- func (c *BaseGateway) GenerateRecord() (models.OrderInfo, models.OrderProfitInfo)
- func (c *BaseGateway) GenerateSuccessData(scanData controller.ScanData) *ScanSuccessData
- func (c *BaseGateway) GetMerchantInfo()
- func (c *BaseGateway) GetOrderInfo() models.OrderInfo
- func (c *BaseGateway) GetOrderProfit(orderInfo models.OrderInfo) models.OrderProfitInfo
- func (c *BaseGateway) IpIsWhite() bool
- func (c *BaseGateway) JudgeParams()
- func (c *BaseGateway) NotifyUrlIsValid()
- func (c *BaseGateway) OrderIsValid()
- func (c *BaseGateway) OrderPeriodIsValid()
- func (c *BaseGateway) OrderPriceIsValid()
- func (c *BaseGateway) OsTypeIsValid()
- func (c *BaseGateway) PayPrepare()
- func (c *BaseGateway) PayWayCodeIsValid()
- func (c *BaseGateway) ProductIsValid()
- func (c *BaseGateway) ReturnUrlIsValid()
- func (c *BaseGateway) RoadIsValid(roadInfo models.RoadInfo) bool
- type ErrorGatewayController
- type OrderQueryFailData
- type PayForGateway
- type PayForQueryResponse
- type PayForResponse
- type QueryController
- type ScanController
- type ScanFailData
- type ScanSuccessData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceResponse ¶
type BalanceResponse struct {
// contains filtered or unexported fields
}
type BaseGateway ¶
type BaseGateway struct { beego.Controller Params map[string]string //请求的基本参数 ClientIp string //商户ip MerchantInfo models.MerchantInfo //商户信息 Msg string //信息 Code int //状态码 200正常 RoadInfo models.RoadInfo RoadPoolInfo models.RoadPoolInfo OrderAmount float64 PayWayCode string PlatformRate float64 AgentRate float64 }
func (*BaseGateway) GenerateRecord ¶
func (c *BaseGateway) GenerateRecord() (models.OrderInfo, models.OrderProfitInfo)
* 生成订单一系列的记录
func (*BaseGateway) GenerateSuccessData ¶
func (c *BaseGateway) GenerateSuccessData(scanData controller.ScanData) *ScanSuccessData
func (*BaseGateway) GetOrderProfit ¶
func (c *BaseGateway) GetOrderProfit(orderInfo models.OrderInfo) models.OrderProfitInfo
计算收益,平台利润,代理利润
func (*BaseGateway) NotifyUrlIsValid ¶
func (c *BaseGateway) NotifyUrlIsValid()
func (*BaseGateway) OrderPeriodIsValid ¶
func (c *BaseGateway) OrderPeriodIsValid()
func (*BaseGateway) OsTypeIsValid ¶
func (c *BaseGateway) OsTypeIsValid()
func (*BaseGateway) PayWayCodeIsValid ¶
func (c *BaseGateway) PayWayCodeIsValid()
func (*BaseGateway) ProductIsValid ¶
func (c *BaseGateway) ProductIsValid()
func (*BaseGateway) ReturnUrlIsValid ¶
func (c *BaseGateway) ReturnUrlIsValid()
func (*BaseGateway) RoadIsValid ¶
func (c *BaseGateway) RoadIsValid(roadInfo models.RoadInfo) bool
判断通道是否是合法的
type ErrorGatewayController ¶
type ErrorGatewayController struct {
beego.Controller
}
func (*ErrorGatewayController) ErrorParams ¶
func (c *ErrorGatewayController) ErrorParams()
type OrderQueryFailData ¶
type PayForGateway ¶
type PayForGateway struct {
beego.Controller
}
type PayForQueryResponse ¶
type PayForQueryResponse struct { ResultMsg string `json:"resultMsg,omitempty"` MerchantOrderId string `json:"merchantOrderId,omitempty"` SettAmount string `json:"settAmount,omitempty"` SettFee string `json:"settFee,omitempty"` SettStatus string `json:"settStatus,omitempty"` Sign string `json:"sign,omitempty"` }
type PayForResponse ¶
type PayForResponse struct { ResultCode string `json:"resultCode,omitempty"` ResultMsg string `json:"resultMsg,omitempty"` MerchantOrderId string `json:"merchantOrderId,omitempty"` SettAmount string `json:"settAmount,omitempty"` SettFee string `json:"settFee,omitempty"` Sign string `json:"sign,omitempty"` }
type QueryController ¶
type QueryController struct {
beego.Controller
}
type ScanController ¶
type ScanController struct {
BaseGateway
}