This commit is contained in:
@@ -5,26 +5,30 @@
|
||||
// 支付渠道类型
|
||||
export type PaymentProviderType = 'wechat' | 'wechat_v2' | 'fuiou'
|
||||
|
||||
// 微信配置
|
||||
export interface WechatConfig {
|
||||
interface PaymentConfigBase {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
provider_type: PaymentProviderType
|
||||
is_active: boolean
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
// 小程序配置
|
||||
interface MiniappConfigFields {
|
||||
miniapp_app_id: string
|
||||
miniapp_app_secret: string
|
||||
}
|
||||
|
||||
// 公众号配置
|
||||
interface OfficialAccountConfigFields {
|
||||
oa_app_id: string
|
||||
oa_app_secret: string
|
||||
oa_token: string
|
||||
oa_aes_key: string
|
||||
oa_oauth_redirect_url: string
|
||||
}
|
||||
|
||||
// 微信配置
|
||||
interface WechatPayConfigFields {
|
||||
wx_mch_id: string
|
||||
wx_api_v2_key: string
|
||||
wx_api_v3_key: string
|
||||
@@ -32,8 +36,19 @@ export interface WechatConfig {
|
||||
wx_serial_no: string
|
||||
wx_cert_content: string
|
||||
wx_key_content: string
|
||||
}
|
||||
|
||||
// 富友支付配置
|
||||
interface AlipayConfigFields {
|
||||
ali_app_id: string
|
||||
ali_private_key: string
|
||||
ali_public_key: string
|
||||
ali_notify_url: string
|
||||
ali_return_url: string
|
||||
ali_pay_expire_minutes: number
|
||||
ali_production: boolean
|
||||
}
|
||||
|
||||
interface FuiouConfigFields {
|
||||
fy_api_url: string
|
||||
fy_ins_cd: string
|
||||
fy_mchnt_cd: string
|
||||
@@ -41,11 +56,25 @@ export interface WechatConfig {
|
||||
fy_notify_url: string
|
||||
fy_private_key: string
|
||||
fy_public_key: string
|
||||
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
type PaymentConfigWritableFields = Partial<
|
||||
MiniappConfigFields &
|
||||
OfficialAccountConfigFields &
|
||||
WechatPayConfigFields &
|
||||
AlipayConfigFields &
|
||||
FuiouConfigFields
|
||||
>
|
||||
|
||||
// 支付配置
|
||||
export interface WechatConfig
|
||||
extends PaymentConfigBase,
|
||||
MiniappConfigFields,
|
||||
OfficialAccountConfigFields,
|
||||
WechatPayConfigFields,
|
||||
AlipayConfigFields,
|
||||
FuiouConfigFields {}
|
||||
|
||||
// 查询参数
|
||||
export interface WechatConfigQueryParams {
|
||||
page?: number
|
||||
@@ -58,78 +87,21 @@ export interface WechatConfigQueryParams {
|
||||
export interface WechatConfigListResponse {
|
||||
items: WechatConfig[]
|
||||
page: number
|
||||
page_size: number
|
||||
size: number
|
||||
total: number
|
||||
page_size?: number
|
||||
}
|
||||
|
||||
// 创建微信支付配置请求
|
||||
export interface CreateWechatConfigRequest {
|
||||
export interface CreateWechatConfigRequest extends PaymentConfigWritableFields {
|
||||
name: string
|
||||
provider_type: PaymentProviderType
|
||||
description?: string
|
||||
|
||||
// 小程序配置
|
||||
miniapp_app_id?: string
|
||||
miniapp_app_secret?: string
|
||||
|
||||
// 公众号配置
|
||||
oa_app_id?: string
|
||||
oa_app_secret?: string
|
||||
oa_token?: string
|
||||
oa_aes_key?: string
|
||||
oa_oauth_redirect_url?: string
|
||||
|
||||
// 微信配置
|
||||
wx_mch_id?: string
|
||||
wx_api_v2_key?: string
|
||||
wx_api_v3_key?: string
|
||||
wx_notify_url?: string
|
||||
wx_serial_no?: string
|
||||
wx_cert_content?: string
|
||||
wx_key_content?: string
|
||||
|
||||
// 富友支付配置
|
||||
fy_api_url?: string
|
||||
fy_ins_cd?: string
|
||||
fy_mchnt_cd?: string
|
||||
fy_term_id?: string
|
||||
fy_notify_url?: string
|
||||
fy_private_key?: string
|
||||
fy_public_key?: string
|
||||
}
|
||||
|
||||
// 更新微信支付配置请求
|
||||
export interface UpdateWechatConfigRequest {
|
||||
export interface UpdateWechatConfigRequest extends PaymentConfigWritableFields {
|
||||
name?: string
|
||||
description?: string
|
||||
provider_type?: PaymentProviderType
|
||||
|
||||
// 小程序配置
|
||||
miniapp_app_id?: string
|
||||
miniapp_app_secret?: string
|
||||
|
||||
// 公众号配置
|
||||
oa_app_id?: string
|
||||
oa_app_secret?: string
|
||||
oa_token?: string
|
||||
oa_aes_key?: string
|
||||
oa_oauth_redirect_url?: string
|
||||
|
||||
// 微信配置
|
||||
wx_mch_id?: string
|
||||
wx_api_v2_key?: string
|
||||
wx_api_v3_key?: string
|
||||
wx_notify_url?: string
|
||||
wx_serial_no?: string
|
||||
wx_cert_content?: string
|
||||
wx_key_content?: string
|
||||
|
||||
// 富友支付配置
|
||||
fy_api_url?: string
|
||||
fy_ins_cd?: string
|
||||
fy_mchnt_cd?: string
|
||||
fy_term_id?: string
|
||||
fy_notify_url?: string
|
||||
fy_private_key?: string
|
||||
fy_public_key?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user