增加微信支付,商城逻辑,公告
This commit is contained in:
24
config/wechatPay.js
Normal file
24
config/wechatPay.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// 微信支付配置
|
||||
module.exports = {
|
||||
// 微信支付配置
|
||||
wechatPay: {
|
||||
appId: process.env.WECHAT_APP_ID || '', // 微信公众号AppID
|
||||
mchId: process.env.WECHAT_MCH_ID || '', // 商户号
|
||||
apiKey: process.env.WECHAT_API_KEY || '', // API密钥
|
||||
apiV3Key: process.env.WECHAT_API_V3_KEY || '', // APIv3密钥
|
||||
notifyUrl: process.env.WECHAT_NOTIFY_URL || 'https://your-domain.com/api/wechat/notify', // 支付回调地址
|
||||
|
||||
// 证书路径(生产环境需要配置)
|
||||
certPath: process.env.WECHAT_CERT_PATH || '',
|
||||
keyPath: process.env.WECHAT_KEY_PATH || '',
|
||||
|
||||
// 支付相关配置
|
||||
tradeType: {
|
||||
h5: 'MWEB', // H5支付
|
||||
jsapi: 'JSAPI' // 公众号支付
|
||||
},
|
||||
|
||||
// 注册费用配置(单位:分)
|
||||
registrationFee: 100 // 1元注册费
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user