From d901999264aa0db308eb650ae5b46fac276fc4f6 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Tue, 7 May 2024 19:24:47 +0800 Subject: [PATCH] add tifenzone --- dbstruct/vas.sql | 1 + etc/mix/mix-prod.yaml | 6 +++--- etc/mix/mix-test.yaml | 10 ++++++++++ library/payclients/wxpaycli/client.go | 10 ++++++---- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/dbstruct/vas.sql b/dbstruct/vas.sql index a7f5d9d1..2a0aad65 100644 --- a/dbstruct/vas.sql +++ b/dbstruct/vas.sql @@ -68,6 +68,7 @@ CREATE INDEX ix_orderid ON vas_ch_charge (order_id); CREATE INDEX mid_ct ON vas_ch_income (mid, ct); CREATE INDEX uid_ct ON vas_ch_income (uid, ct); CREATE INDEX ix_orderid ON vas_ch_income (order_id); +CREATE INDEX ix_ct ON vas_ch_income (ct); CREATE INDEX mid_ct ON vas_ch_withdraw (mid, ct); CREATE INDEX uid_ct ON vas_ch_withdraw (uid, ct); CREATE INDEX ix_orderid ON vas_ch_withdraw (order_id); diff --git a/etc/mix/mix-prod.yaml b/etc/mix/mix-prod.yaml index fd8403be..9430d499 100644 --- a/etc/mix/mix-prod.yaml +++ b/etc/mix/mix-prod.yaml @@ -64,13 +64,13 @@ wxpay: app_secret: "ebc325109b91087e22f046bc8ac5c940" wxpay_tfz: - mchid: "1665016206" - appid: "" + mchid: "1675813721" + appid: "wxc28fd8aaf31984b6" serial_no: "176903F43E78B0BA5AA1F08A3BE852A5F637DC77" apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQGjR" private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_tfz/apiclient_key.pem" notify_url: "https://api.tiefen.fun/ext/vas/wxpay_callback" - app_secret: "mot5410nh69k87e22f046bc8anv5xds8" + app_secret: "ebc325109b91087e22f046bc8ac5c940" apollo: app_id: "wishpal_live_service" diff --git a/etc/mix/mix-test.yaml b/etc/mix/mix-test.yaml index 8c644edf..9e6c47ed 100644 --- a/etc/mix/mix-test.yaml +++ b/etc/mix/mix-test.yaml @@ -36,6 +36,16 @@ wxpay: notify_url: "https://api.wishpal.cn/ext/vas/wxpay_callback" app_secret: "ebc325109b91087e22f046bc8ac5c940" +wxpay_tfz: + mchid: "1675813721" + appid: "wxc28fd8aaf31984b6" + serial_no: "176903F43E78B0BA5AA1F08A3BE852A5F637DC77" + apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQGjR" + private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_tfz/apiclient_key.pem" + notify_url: "https://api.wishpal.cn/ext/vas/wxpay_callback" + app_secret: "ebc325109b91087e22f046bc8ac5c940" + apiv2_key: "mot5410nh69k87e22f046bc8anv5xds8" + crypto: aes: private_key: "Xbz1145141919810" diff --git a/library/payclients/wxpaycli/client.go b/library/payclients/wxpaycli/client.go index a6d353a2..9567722b 100644 --- a/library/payclients/wxpaycli/client.go +++ b/library/payclients/wxpaycli/client.go @@ -31,18 +31,19 @@ const ( ) const ( - AppIdXinYiDaoLe = "wxc28fd8aaf31984b6" - AppIdTieFenZone = "" + AppIdXinYiDaoLe = "1665016206" + AppIdTieFenZone = "1675813721" ) var allWxpayClients = map[string]*WxpayClient{} func GetDefaultWxpayClient() *WxpayClient { - return allWxpayClients[AppIdXinYiDaoLe] + return allWxpayClients[AppIdTieFenZone] } type WxpayClient struct { clientV3 *wxpayv3.ClientV3 + MchId string `json:"mch_id"` AppSecret string `json:"app_secret"` AppId string `json:"app_id"` NotifyUrl string `json:"notify_url"` @@ -60,7 +61,7 @@ func InitMulti(cfgList ...*configcenter.WxpayClientConfig) (err error) { err = errors.New("NewAlipayClient fail") return } - allWxpayClients[cli.AppId] = cli + allWxpayClients[cli.MchId] = cli } return } @@ -82,6 +83,7 @@ func NewWxpayClient(cfg *configcenter.WxpayClientConfig) (ret *WxpayClient, err ret = &WxpayClient{ clientV3: wxpayCliV3, + MchId: cfg.MchId, AppSecret: cfg.AppSecret, AppId: cfg.AppId, NotifyUrl: cfg.NotifyUrl,