mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-07 09:43:43 +08:00
feat: integrated Alipay payment module
This commit is contained in:
@@ -21,6 +21,9 @@ type AppConfig struct {
|
||||
MjConfig MidJourneyConfig // mj 绘画配置
|
||||
WeChatBot bool // 是否启用微信机器人
|
||||
SdConfig StableDiffusionConfig // sd 绘画配置
|
||||
|
||||
XXLConfig XXLConfig
|
||||
AlipayConfig AlipayConfig
|
||||
}
|
||||
|
||||
type ChatPlusApiConfig struct {
|
||||
@@ -57,6 +60,27 @@ type AliYunSmsConfig struct {
|
||||
CodeTempId string // 验证码短信模板 ID
|
||||
}
|
||||
|
||||
type AlipayConfig struct {
|
||||
Enabled bool // 是否启用支付宝服务
|
||||
Company string // 公司名称
|
||||
UserId string // 支付宝用户 ID
|
||||
AppId string // 支付宝 AppID
|
||||
PrivateKey string // 用户私钥文件路径
|
||||
PublicKey string // 用户公钥文件路径
|
||||
AlipayPublicKey string // 支付宝公钥文件路径
|
||||
RootCert string // Root 秘钥路径
|
||||
ReturnURL string // 支付成功返回 URL
|
||||
NotifyURL string // 异步通知回调
|
||||
}
|
||||
|
||||
type XXLConfig struct { // XXL 任务调度配置
|
||||
ServerAddr string
|
||||
AccessToken string
|
||||
ExecutorIp string
|
||||
ExecutorPort string
|
||||
RegistryKey string
|
||||
}
|
||||
|
||||
type RedisConfig struct {
|
||||
Host string
|
||||
Port int
|
||||
|
||||
17
api/core/types/order.go
Normal file
17
api/core/types/order.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package types
|
||||
|
||||
type OrderStatus int
|
||||
|
||||
const (
|
||||
OrderNotPaid = OrderStatus(0)
|
||||
OrderScanned = OrderStatus(1) // 已扫码
|
||||
OrderPaidSuccess = OrderStatus(2)
|
||||
)
|
||||
|
||||
type OrderRemark struct {
|
||||
Days int `json:"days"` // 有效期
|
||||
Calls int `json:"calls"` // 增加调用次数
|
||||
Name string `json:"name"` // 产品名称
|
||||
Price float64 `json:"price"`
|
||||
Discount float64 `json:"discount"`
|
||||
}
|
||||
Reference in New Issue
Block a user