PaymentCenter/app/constants/common/common.go

73 lines
2.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package common
const (
TOKEN_PRE = "player_token_"
TOKEN_Admin = "Admin_token_"
ADMIN_V1 = "/pay/admin/api/v1"
FRONT_V1 = "/pay/front/api/v1"
// 支付渠道枚举,1微信JSAPI2微信H53微信app4微信Native5微信小程序6支付宝网页&移动应用7支付宝小程序8支付宝JSAPI
PAY_CHANNEL_UNKNOWN = 0
PAY_CHANNEL_WECHAT_JSAPI = 1
PAY_CHANNEL_WECHAT_H5 = 2
PAY_CHANNEL_WECHAT_APP = 3
PAY_CHANNEL_WECHAT_NATIVE = 4
PAY_CHANNEL_WECHAT_MINI = 5
PAY_CHANNEL_ALIPAY_WEB = 6
PAY_CHANNEL_ALIPAY_MINI = 7
PAY_CHANNEL_ALIPAY_JSAPI = 8
// 统一登陆信息
ADMIN_USER_ID = "User-Id"
ADMIN_USER_NAME = "User-Name"
ADMIN_USER_INCLUDEUSERS = "Include-Users"
// '订单状态: 1待支付、2支付中、3支付成功、4支付失败、5订单关闭 6支付完成后退款,
ORDER_STATUS_WAITPAY = 1
ORDER_STATUS_PAYING = 2
ORDER_STATUS_PAYED = 3
ORDER_STATUS_FAILED = 4
ORDER_STATUS_CLOSE = 5
ORDER_STATUS_REFUND = 6
// 订单类型1支付2退款
ORDER_TYPE_PAY = 1
ORDER_TYPE_REFUND = 2
STATUS_ENABLE = 1
STATUS_DISABLED = 2
PAY_CHANNLE_TYPE_WECHAT = 1 // 支付类型: 微信
PAY_CHANNLE_TYPE_ZFB = 2 // 支付类型:支付宝
THIRD_ORDER_TYPE_PAY = 1 // 发起支付
THIRD_ORDER_TYPE_ORDER_QUERY = 2 // 查询订单
THIRD_ORDER_TYPE_REFUND = 3 // 发起退款
THIRD_ORDER_TYPE_REFUND_QUERY = 4 // 退款查询
THIRD_ORDER_TYPE_CLOSE = 5 // 关闭订单
THIRD_ORDER_TYPE_CALL_BACK = 6 // 支付回调
)
var PayChannelList = map[int]string{
PAY_CHANNEL_WECHAT_JSAPI: "微信JSAPI",
PAY_CHANNEL_WECHAT_H5: "微信H5",
PAY_CHANNEL_WECHAT_APP: "微信app",
PAY_CHANNEL_WECHAT_NATIVE: "微信Native",
PAY_CHANNEL_WECHAT_MINI: "微信小程序",
PAY_CHANNEL_ALIPAY_WEB: "支付宝网页&移动应用",
PAY_CHANNEL_ALIPAY_MINI: "支付宝小程序",
PAY_CHANNEL_ALIPAY_JSAPI: "支付宝JSAPI",
}
var OrderTypeList = map[int]string{
ORDER_TYPE_PAY: "付款",
ORDER_TYPE_REFUND: "退款",
}
var OrderStatusMap = map[int]string{
ORDER_STATUS_WAITPAY: "等待执行",
ORDER_STATUS_PAYING: "执行中",
ORDER_STATUS_PAYED: "执行成功",
ORDER_STATUS_FAILED: "执行失败",
ORDER_STATUS_CLOSE: "订单关闭",
}