mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2025-10-17 02:28:00 +08:00
由gopath形式改为module
This commit is contained in:
50
gateway/common/consts.go
Normal file
50
gateway/common/consts.go
Normal file
@@ -0,0 +1,50 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/25 14:14
|
||||
** @Author : yuebin
|
||||
** @File : consts.go
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/25 14:14
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package common
|
||||
|
||||
const (
|
||||
ACTIVE = "active"
|
||||
UNACTIVE = "unactive"
|
||||
DELETE = "delete"
|
||||
REFUND = "refund"
|
||||
ORDERROLL = "order_roll"
|
||||
WAIT = "wait"
|
||||
SUCCESS = "success"
|
||||
FAIL = "fail"
|
||||
YES = "yes"
|
||||
NO = "no"
|
||||
ZERO = 0.0 //0元手续费
|
||||
VERIFY_CODE_LEN = 4 //验证码的长度
|
||||
PAYFOR_FEE = 2.00 //代付手续费
|
||||
PAYFOR_INTERVAL = 5 //每过5分钟执行一次代付
|
||||
|
||||
PLUS_AMOUNT = "plus_amount" //加款操作
|
||||
SUB_AMOUNT = "sub_amount" //减款操作
|
||||
FREEZE_AMOUNT = "freeze_amount" //冻结操作
|
||||
UNFREEZE_AMOUNT = "unfreeze_amount" //解冻操作
|
||||
|
||||
PAYFOR_COMFRIM = "payfor_confirm" //下发带审核
|
||||
PAYFOR_SOLVING = "payfor_solving" //发下处理中
|
||||
PAYFOR_HANDING = "payfor_handing" //手动打款中
|
||||
PAYFOR_BANKING = "payfor_banking" //银行处理中
|
||||
PAYFOR_FAIL = "payfor_fail" //代付失败
|
||||
PAYFOR_SUCCESS = "payfor_success" //代付成功
|
||||
|
||||
PAYFOR_ROAD = "payfor_road" //通道打款
|
||||
PAYFOR_HAND = "payfor_hand" //手动打款
|
||||
PAYFOR_REFUSE = "payfor_refuse" // 拒绝打款
|
||||
|
||||
SELF_API = "self_api" //自助api系统下发
|
||||
SELF_MERCHANT = "self_merchant" //管理手动处理商户下发
|
||||
SELF_HELP = "self_help" //管理自己提现
|
||||
|
||||
PUBLIC = "public" //对公卡
|
||||
PRIVATE = "private" //对私卡
|
||||
)
|
25
gateway/common/mq_config.go
Normal file
25
gateway/common/mq_config.go
Normal file
@@ -0,0 +1,25 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/11/6 11:37
|
||||
** @Author : yuebin
|
||||
** @File : mq_config
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/11/6 11:37
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package common
|
||||
|
||||
import "net"
|
||||
|
||||
const (
|
||||
mqHost = "127.0.0.1"
|
||||
mqPort = "61613"
|
||||
|
||||
MqOrderQuery = "order_query"
|
||||
MQ_PAYFOR_QUERY = "payfor_query"
|
||||
MqOrderNotify = "order_notify"
|
||||
)
|
||||
|
||||
func GetMQAddress() string {
|
||||
return net.JoinHostPort(mqHost, mqPort)
|
||||
}
|
99
gateway/common/pay_way_code.go
Normal file
99
gateway/common/pay_way_code.go
Normal file
@@ -0,0 +1,99 @@
|
||||
/***************************************************
|
||||
** @Desc : This file for ...
|
||||
** @Time : 2019/10/29 15:01
|
||||
** @Author : yuebin
|
||||
** @File : pay_way_code
|
||||
** @Last Modified by : yuebin
|
||||
** @Last Modified time: 2019/10/29 15:01
|
||||
** @Software: GoLand
|
||||
****************************************************/
|
||||
package common
|
||||
|
||||
var ScanPayWayCodes = []string{
|
||||
"WEIXIN_SCAN",
|
||||
"UNION_SCAN",
|
||||
"ALI_SCAN",
|
||||
"BAIDU_SCAN",
|
||||
"JD_SCAN",
|
||||
"QQ_SCAN",
|
||||
}
|
||||
|
||||
var H5PayWayCodes = []string{
|
||||
"WEIXIN_H5",
|
||||
"ALI_H5",
|
||||
"QQ_H5",
|
||||
"UNION_H5",
|
||||
"BAIDU_H5",
|
||||
"JD_H5",
|
||||
}
|
||||
|
||||
var SytPayWayCodes = []string{
|
||||
"WEIXIN_SYT",
|
||||
"ALI_SYT",
|
||||
"QQ_SYT",
|
||||
"UNION_SYT",
|
||||
"BAIDU_SYT",
|
||||
"JD_SYT",
|
||||
}
|
||||
|
||||
var FastPayWayCodes = []string{
|
||||
"UNION-FAST",
|
||||
}
|
||||
|
||||
var WebPayWayCode = []string{
|
||||
"UNION-WAP",
|
||||
}
|
||||
|
||||
func GetScanPayWayCodes() []string {
|
||||
return ScanPayWayCodes
|
||||
}
|
||||
|
||||
func GetNameByPayWayCode(code string) string {
|
||||
switch code {
|
||||
case "WEIXIN_SCAN":
|
||||
return "微信扫码"
|
||||
case "UNION_SCAN":
|
||||
return "银联扫码"
|
||||
case "ALI_SCAN":
|
||||
return "支付宝扫码"
|
||||
case "BAIDU_SCAN":
|
||||
return "百度扫码"
|
||||
case "JD_SCAN":
|
||||
return "京东扫码"
|
||||
case "QQ_SCAN":
|
||||
return "QQ扫码"
|
||||
|
||||
case "WEIXIN_H5":
|
||||
return "微信H5"
|
||||
case "UNION_H5":
|
||||
return "银联H5"
|
||||
case "ALI_H5":
|
||||
return "支付宝H5"
|
||||
case "BAIDU_H5":
|
||||
return "百度H5"
|
||||
case "JD_H5":
|
||||
return "京东H5"
|
||||
case "QQ_H5":
|
||||
return "QQ-H5"
|
||||
|
||||
case "WEIXIN_SYT":
|
||||
return "微信收银台"
|
||||
case "UNION_SYT":
|
||||
return "银联收银台"
|
||||
case "ALI_SYT":
|
||||
return "支付宝收银台"
|
||||
case "BAIDU_SYT":
|
||||
return "百度收银台"
|
||||
case "JD_SYT":
|
||||
return "京东收银台"
|
||||
case "QQ_SYT":
|
||||
return "QQ-收银台"
|
||||
|
||||
case "UNION_FAST":
|
||||
return "银联快捷"
|
||||
case "UNION_WAP":
|
||||
return "银联web"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user