controller

package
v0.0.0-...-fab86cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2019 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

**************************************************

** @Desc : This file for ...
** @Time : 2019/10/28 16:38
** @Author : yuebin
** @File : alipay
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/28 16:38
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for ...
** @Time : 2019/11/19 18:12
** @Author : yuebin
** @File : consts.go
** @Last Modified by : yuebin
** @Last Modified time: 2019/11/19 18:12
** @Software: GoLand

***************************************************

**************************************************

** @Desc : 处理网关模块的一些需要操作数据库的功能
** @Time : 2019/12/7 16:40
** @Author : yuebin
** @File : gateway_solve
** @Last Modified by : yuebin
** @Last Modified time: 2019/12/7 16:40
** @Software: GoLand

***************************************************

**************************************************

** @Desc : 注册上游支付接口
** @Time : 2019/10/28 14:48
** @Author : yuebin
** @File : init
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/28 14:48
** @Software: GoLand

***************************************************

**************************************************

** @Desc : 快付支付的实现逻辑
** @Time : 2019/10/28 14:12
** @Author : yuebin
** @File : kuaifu
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/28 14:12
** @Software: GoLand

***************************************************

**************************************************

** @Desc : 订单结算,将订单上面的钱加入到账户余额中
** @Time : 2019/11/22 11:34
** @Author : yuebin
** @File : order_settle
** @Last Modified by : yuebin
** @Last Modified time: 2019/11/22 11:34
** @Software: GoLand

***************************************************

**************************************************

** @Desc : 处理订单状态,用户加款等核心业务
** @Time : 2019/10/31 11:44
** @Author : yuebin
** @File : pay_solve
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/31 11:44
** @Software: GoLand

***************************************************

**************************************************

** @Desc : 代付处理
** @Time : 2019/11/28 18:52
** @Author : yuebin
** @File : payfor_solve
** @Last Modified by : yuebin
** @Last Modified time: 2019/11/28 18:52
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for ...
** @Time : 2019/10/28 9:39
** @Author : yuebin
** @File : supplier_interface
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/28 9:39
** @Software: GoLand

***************************************************

**************************************************

** @Desc : This file for ...
** @Time : 2019/10/28 16:38
** @Author : yuebin
** @File : weixin
** @Last Modified by : yuebin
** @Last Modified time: 2019/10/28 16:38
** @Software: GoLand

***************************************************

Index

Constants

View Source
const (
	HOST             = "localhost"
	KF_SCAN_HOST     = "http://" + HOST + "/gateway/scanPay/payService"
	KF_PAYFOR_HOST   = "http://" + HOST + "/gateway/remittance/pay"
	KF_BALANCE_QUERY = "http://" + HOST + "/gateway/remittance/getBalance"
	KF_ORDER_QUERY   = "http://" + HOST + "/gateway/scanPay/orderQuery"
	KF_PAYFOR_QUERY  = "http://" + HOST + "/gateway/remittance/query"
	KF_PAY_KEY       = "xxxxxxx"
	KF_PAY_SECRET    = "xxxxxx"
)
View Source
const (
	PayNotify = ""
)

Variables

This section is empty.

Functions

func Init

func Init()

func InsertOrderAndOrderProfit

func InsertOrderAndOrderProfit(orderInfo models.OrderInfo, orderProfitInfo models.OrderProfitInfo) bool

* 插入支付订单记录和订单利润记录,保证一致性

func MerchantAbleAmount

func MerchantAbleAmount(merchantLoad models.MerchantLoadInfo) bool

* 对应的商户的账户可用金额进行调整操作

func MerchantLoadSolve

func MerchantLoadSolve()

* 商户的押款释放处理,根据商户的押款时间进行处理

func OrderSettle

func OrderSettle()

订单结算,将那些支付成功的订单金额加入到商户账户的结算金额中

func PayForFail

func PayForFail(payFor models.PayforInfo) bool

func PayForSuccess

func PayForSuccess(payFor models.PayforInfo) bool

func RequestPayFor

func RequestPayFor(payFor models.PayforInfo)

func SendPayFor

func SendPayFor(payFor models.PayforInfo) bool

func SolvePayFor

func SolvePayFor()

* 执行逻辑

func SolvePayForConfirm

func SolvePayForConfirm()

* 自动审核代付订单

Types

type AlipayImpl

type AlipayImpl struct {
}

func (*AlipayImpl) BalanceQuery

func (c *AlipayImpl) BalanceQuery(roadInfo models.RoadInfo) float64

func (*AlipayImpl) Fast

func (c *AlipayImpl) Fast(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) bool

func (*AlipayImpl) H5

func (c *AlipayImpl) H5(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*AlipayImpl) PayFor

func (c *AlipayImpl) PayFor(info models.PayforInfo) string

func (*AlipayImpl) PayForNotify

func (c *AlipayImpl) PayForNotify() string

func (*AlipayImpl) PayForQuery

func (c *AlipayImpl) PayForQuery(payFor models.PayforInfo) (string, string)

func (*AlipayImpl) PayNotify

func (c *AlipayImpl) PayNotify()

func (*AlipayImpl) PayQuery

func (c *AlipayImpl) PayQuery(orderInfo models.OrderInfo) bool

func (*AlipayImpl) Scan

func (c *AlipayImpl) Scan(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*AlipayImpl) Syt

func (c *AlipayImpl) Syt(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*AlipayImpl) Web

func (c *AlipayImpl) Web(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) bool

type KuaiFuImpl

type KuaiFuImpl struct {
	beego.Controller
}

func (*KuaiFuImpl) BalanceQuery

func (c *KuaiFuImpl) BalanceQuery(roadInfo models.RoadInfo) float64

func (*KuaiFuImpl) Fast

func (c *KuaiFuImpl) Fast(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) bool

func (*KuaiFuImpl) H5

func (c *KuaiFuImpl) H5(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*KuaiFuImpl) PayFor

func (c *KuaiFuImpl) PayFor(payFor models.PayforInfo) string

func (*KuaiFuImpl) PayForNotify

func (c *KuaiFuImpl) PayForNotify() string

func (*KuaiFuImpl) PayForQuery

func (c *KuaiFuImpl) PayForQuery(payFor models.PayforInfo) (string, string)

func (*KuaiFuImpl) PayNotify

func (c *KuaiFuImpl) PayNotify()

支付回调

func (*KuaiFuImpl) PayQuery

func (c *KuaiFuImpl) PayQuery(orderInfo models.OrderInfo) bool

func (*KuaiFuImpl) Scan

func (c *KuaiFuImpl) Scan(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*KuaiFuImpl) Syt

func (c *KuaiFuImpl) Syt(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*KuaiFuImpl) Web

func (c *KuaiFuImpl) Web(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) bool

type PaySolveController

type PaySolveController struct {
}

func (*PaySolveController) CompareOrderAndFactAmount

func (c *PaySolveController) CompareOrderAndFactAmount(factAmount float64, orderInfo models.OrderInfo) int

比较订单金额和实际支付金额的大小

func (*PaySolveController) CreateOrderNotifyInfo

func (c *PaySolveController) CreateOrderNotifyInfo(orderInfo models.OrderInfo, tradeStatus string)

支付完成后,处理给商户的回调信息

func (*PaySolveController) SolveOrderFreeze

func (c *PaySolveController) SolveOrderFreeze(bankOrderId string) bool

处理订单冻结

func (*PaySolveController) SolveOrderRoll

func (c *PaySolveController) SolveOrderRoll(bankOrderId string) bool

func (*PaySolveController) SolveOrderUnfreeze

func (c *PaySolveController) SolveOrderUnfreeze(bankOrderId string) bool

订单解冻

func (*PaySolveController) SolvePayFail

func (c *PaySolveController) SolvePayFail(orderInfo models.OrderInfo, str string) bool

处理支付失败

func (*PaySolveController) SolvePaySuccess

func (c *PaySolveController) SolvePaySuccess(bankOrderId string, factAmount float64, trxNo string) bool

处理支付成功的加款等各项操作

func (*PaySolveController) SolveRefund

func (c *PaySolveController) SolveRefund(bankOrderId string) bool

type ScanData

type ScanData struct {
	Supplier   string //上游的通道供应商
	PayType    string //支付类型
	OrderNo    string //下游商户请求订单号
	BankNo     string //本系统的请求订单号
	OrderPrice string //订单金额
	FactPrice  string //实际的展示在客户面前的金额
	Status     string //状态码 '00' 成功
	PayUrl     string //支付二维码链接地址
	Msg        string //附加的信息
}

定义扫码支付的返回值

type WeiXinImpl

type WeiXinImpl struct {
}

func (*WeiXinImpl) BalanceQuery

func (c *WeiXinImpl) BalanceQuery(roadInfo models.RoadInfo) float64

func (*WeiXinImpl) Fast

func (c *WeiXinImpl) Fast(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) bool

func (*WeiXinImpl) H5

func (c *WeiXinImpl) H5(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*WeiXinImpl) PayFor

func (c *WeiXinImpl) PayFor(payFor models.PayforInfo) string

func (*WeiXinImpl) PayForNotify

func (c *WeiXinImpl) PayForNotify() string

func (*WeiXinImpl) PayForQuery

func (c *WeiXinImpl) PayForQuery(payFor models.PayforInfo) (string, string)

func (*WeiXinImpl) PayNotify

func (c *WeiXinImpl) PayNotify()

func (*WeiXinImpl) PayQuery

func (c *WeiXinImpl) PayQuery(orderInfo models.OrderInfo) bool

func (*WeiXinImpl) Scan

func (c *WeiXinImpl) Scan(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*WeiXinImpl) Syt

func (c *WeiXinImpl) Syt(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) ScanData

func (*WeiXinImpl) Web

func (c *WeiXinImpl) Web(orderInfo models.OrderInfo, roadInfo models.RoadInfo, merchantInfo models.MerchantInfo) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL