From 8fa1d2786872edcecf1ee3e7febbafde722b9c82 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Fri, 9 Aug 2024 15:07:58 +0800 Subject: [PATCH] shuilai tf --- app/mix/conf/cfg.go | 1 + app/mix/service/service.go | 2 +- etc/mix/mix-local.yaml | 8 +++++ etc/mix/mix-prod.yaml | 8 +++++ etc/mix/mix-test.yaml | 8 +++++ .../wxpaycert_shuilaitf/apiclient_cert.p12 | Bin 0 -> 2774 bytes .../wxpaycert_shuilaitf/apiclient_cert.pem | 25 ++++++++++++++++ etc/mix/wxpaycert_shuilaitf/apiclient_key.pem | 28 ++++++++++++++++++ library/payclients/wxpaycli/client.go | 3 +- library/payclients/wxpaycli/client_test.go | 2 +- 10 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 etc/mix/wxpaycert_shuilaitf/apiclient_cert.p12 create mode 100644 etc/mix/wxpaycert_shuilaitf/apiclient_cert.pem create mode 100644 etc/mix/wxpaycert_shuilaitf/apiclient_key.pem diff --git a/app/mix/conf/cfg.go b/app/mix/conf/cfg.go index 898d1110..efac4254 100644 --- a/app/mix/conf/cfg.go +++ b/app/mix/conf/cfg.go @@ -10,6 +10,7 @@ type ConfigSt struct { Wxpay *configcenter.WxpayClientConfig `json:"wxpay" yaml:"wxpay"` // 微信支付 WxpayTFZ *configcenter.WxpayClientConfig `json:"wxpay_tfz" yaml:"wxpay_tfz"` // 微信支付 WxpayTieFanZone *configcenter.WxpayClientConfig `json:"wxpay_tiefanzone" yaml:"wxpay_tiefanzone"` // 微信支付 + WxpayShuilaitf *configcenter.WxpayClientConfig `json:"wxpay_shuilaitf" yaml:"wxpay_shuilaitf"` // 微信支付 Alipay *configcenter.AlipayClientConfig `json:"alipay" yaml:"alipay"` // 支付宝 心意到了 AlipayMYTS *configcenter.AlipayClientConfig `json:"alipay_myts" yaml:"alipay_myts"` // 支付宝 觅缘天使 AlipayLX01 *configcenter.AlipayClientConfig `json:"alipay_lx01" yaml:"alipay_lx01"` // 支付宝 揽星02 diff --git a/app/mix/service/service.go b/app/mix/service/service.go index 58fe4fb0..591f3ad6 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -187,7 +187,7 @@ func (s *Service) Init(c any) (err error) { return } - err = wxpaycli.InitMulti(cfg.Wxpay, cfg.WxpayTFZ, cfg.WxpayTieFanZone) + err = wxpaycli.InitMulti(cfg.Wxpay, cfg.WxpayTFZ, cfg.WxpayTieFanZone, cfg.WxpayShuilaitf) if err != nil { logger.Error("wxpaycli.Init fail, cfg: %v, err: %v", util.ToJson(cfg.Wxpay), err) return diff --git a/etc/mix/mix-local.yaml b/etc/mix/mix-local.yaml index 0589114d..9e175d14 100644 --- a/etc/mix/mix-local.yaml +++ b/etc/mix/mix-local.yaml @@ -44,6 +44,14 @@ wxpay_tiefanzone: private_key_path: "/Users/erwin/wishpalv2/service/etc/mix/wxpaycert_tiefanzone/apiclient_key.pem" notify_url: "https://testapi.tiefen.fun/ext/vas/wxpay_callback" +wxpay_shuilaitf: + mchid: "1682472761" + appid: "wx9ef291dbf4684ace" + serial_no: "736BA7A6BACB40F71A460B553D7D6D9B3D0E28EC" + apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQ123" + private_key_path: "/Users/erwin/wishpalv2/service/etc/mix/wxpaycert_shuilaitf/apiclient_key.pem" + notify_url: "https://testapi.tiefen.fun/ext/vas/wxpay_callback" + crypto: aes: private_key: "Xbz1145141919810" diff --git a/etc/mix/mix-prod.yaml b/etc/mix/mix-prod.yaml index 01c3b88e..e06edec3 100644 --- a/etc/mix/mix-prod.yaml +++ b/etc/mix/mix-prod.yaml @@ -99,6 +99,14 @@ wxpay_tiefanzone: private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_tiefanzone/apiclient_key.pem" notify_url: "https://api.tiefen.fun/ext/vas/wxpay_callback" +wxpay_shuilaitf: + mchid: "1682472761" + appid: "wx9ef291dbf4684ace" + serial_no: "736BA7A6BACB40F71A460B553D7D6D9B3D0E28EC" + apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQ123" + private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_shuilaitf/apiclient_key.pem" + notify_url: "https://api.tiefen.fun/ext/vas/wxpay_callback" + apollo: app_id: "wishpal_live_service" cluster: "dev" diff --git a/etc/mix/mix-test.yaml b/etc/mix/mix-test.yaml index c068d3d8..fce28f9d 100644 --- a/etc/mix/mix-test.yaml +++ b/etc/mix/mix-test.yaml @@ -54,6 +54,14 @@ wxpay_tiefanzone: private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_tiefanzone/apiclient_key.pem" notify_url: "https://testapi.tiefen.fun/ext/vas/wxpay_callback" +wxpay_shuilaitf: + mchid: "1682472761" + appid: "wx9ef291dbf4684ace" + serial_no: "736BA7A6BACB40F71A460B553D7D6D9B3D0E28EC" + apiv3_key: "5QwY1XMK1HW3JQwGKbA3mfJ5cdsTQ123" + private_key_path: "/app/wishpal-ironfan/etc/mix/wxpaycert_shuilaitf/apiclient_key.pem" + notify_url: "https://testapi.tiefen.fun/ext/vas/wxpay_callback" + crypto: aes: private_key: "Xbz1145141919810" diff --git a/etc/mix/wxpaycert_shuilaitf/apiclient_cert.p12 b/etc/mix/wxpaycert_shuilaitf/apiclient_cert.p12 new file mode 100644 index 0000000000000000000000000000000000000000..bf9ec131882f9dd3868445c1f1fdafdc5493e807 GIT binary patch literal 2774 zcmY+^cRU-476{Z*ncFkHP_9(U5plUWnsMV_0Xv|vGt5zvRTP@e9 z){4DVtfHZ*QR}&%&wH=${c%3$bAIQ1&Yxcl9x)68(qQliA`~u>XqdQ94}<}W@Q5@p z9+7+=Ct&ap*zXmz2oFBM;K5W75OChMes6#nUMS+Vi-x&MC z?-0oKs&ZeDz>=NdbpV)6VDMQ&{&{mVwA;_r;zEl{E7~8_P3o+_{}^RdRLcHrDA7-A zX_=D2&tT~u+-~OP8LmS{V?uG=R522ppvX*Vj{7wb`p9U!c&GWbJ;RcqyW_k}$cr}( z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DAYa`RPpIZN{@2U4xb`2I};btELYI#$V_$M(xFBIqkN6)Z&cSqv6Q(&5e#7?-TyK6CY7=r%qb_ z$@56z8=JA?ZK0FsO^?;@izaVdgz%3{dN}=s3E3_dI6v4QE|VR=N#SN^D>YEpGKpOoLBVB43pqJ$-FSo3~e zpkXOuyO&q7#iKLw>(#_tm@FWKn&fzqRADdGkSCsO;2NIs9PhL8YIGTMELV`)&7}8) z*#odY$Xc%-N%G5Ux4}skw(5=ib+ny7C1<3O;;r5yI~uL)BYnJQGQq}r^yQ&^NDqYI z&H$A$D}7TeuQ{ybI4PQdHA4xMe#c&0-cr_&H>%1vqZ11T`T81J2I$nx!BvxUfAAWW z&!}mofMTf}jtcY^0a&D?SeFV7&5H&40Twc5q^F=uUFi=JxH6(jhT`nP>Ba}J>OVHQ)!gs6 zH91KKiIHTVnnp4&4j}cPyyF(Vt|fK1v-v%fT(-^kVR&T5s+ZkcN#f3umcw=j3;$;K z88~rP;x=OHs~Tiq&E%vdpzE+I!#lfTc36d*b!FWAC4Y0Wsz@P@%~zQE%K#EO8f|L! zv`;@abM$kS=Us^yYIR-qR>Z*3bnhwOuASoLzDA3;n6ecy zQnkjtQHnFT(`BHCi-y|3>}TS;ODZ$S&&U*_LF?T;+gcU9?jx0AM-^3L znrIl_i5uv6%y)0f&Z;W3sJPp zgg?1Y5GthRXMS--i^q}ENCx()hpE_4zWmOqVZrFh;RW_ElL#1$WF&5HxHh(+3HCux z7kNUWQna);WFOuhjZi;4SlUI#;CU9UZaAY+Q=GGQU7n+_IJ+zdm`yTe;Q$*_#4IP{xz=xOk~pv zpm#pq1mFPI0p923ah~D;UKlBi00s_)NHWlXcpv~U8%n?S!YTU3nhbODF`prc-So!{6TLThb literal 0 HcmV?d00001 diff --git a/etc/mix/wxpaycert_shuilaitf/apiclient_cert.pem b/etc/mix/wxpaycert_shuilaitf/apiclient_cert.pem new file mode 100644 index 00000000..bd7340e0 --- /dev/null +++ b/etc/mix/wxpaycert_shuilaitf/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0MjJFMTJCMjdB +OUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQCYARva +SPotKFEQJNX5a4ZpXL1lOCq+VIocVLmmZAlA95Gq/UcH54ci1BEKvv0ZRDxfcDoA +rBAC3sFlZ/aLXmSXwJWguPYiG7aK0B/MXCslmS41h9MBcCR6BfiM959t0AepK4P1 ++7j0NA1+eH9pe04Oh+COHxV3DDVNYjDj6hXLWT4vAwe3MGp75mi/N6sJOLe5rpzP +pNVKV/l9PNHtYTtqIcILPRr/kDd74AXZEuTzy7cylGFHKWdG7z9ARgoGIPNIC3CK +lKRssvv81L87GSPay35mDfkSnWen2YK0YByPttqEZoCUgdfm+rdDDF4nmcD1rbuv +/qadtX1JqknBR/Ca +-----END CERTIFICATE----- diff --git a/etc/mix/wxpaycert_shuilaitf/apiclient_key.pem b/etc/mix/wxpaycert_shuilaitf/apiclient_key.pem new file mode 100644 index 00000000..51ab0f17 --- /dev/null +++ b/etc/mix/wxpaycert_shuilaitf/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDKT1oRcbJoQQRN +uEEuLbxt1jTlp1H1EwyRbzCLM5au2tU1jrubs+HRuu6yuzoFUaUXJ28Ze7JUzQOM +ZwH+hvnPaSBa5OhVJceUQkewclw1m+cvXvmUQkxVd3qymg5sKisxEoZH0kal+Xv7 +gxykGtfNuQk+3wlW9byLY6XtivxrzqGF99Zlf2qQevd4UMspqXyXuStaw+ZwLHHT +4gGSxSSOPN8BOXuDMYjhQX0zHl0MDquq+phXwxqM4svkTmMT3JRJlCmpTAAOAbk2 +N/HV7LJaTbXb5rzdMLW06wogUYLtXXPseKwZ7yIEZD8o4QXpqK2FHbjw3NZot85d +471hAWldAgMBAAECggEATGu1JinArskAiysy0/LK3uKvkKCnwN+1O6q4t5yBKwPW +zihgjexhPQxT5of63s98gUaQHRw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dbSA1iNitGVIDLxANa7AvbRxHO9SgOTCGfeSqkYSUAQwq5y4sUrUMn1yCFYpvjRE +ggfJ+goW+ffNCzq5D5G5oKs= +-----END PRIVATE KEY----- diff --git a/library/payclients/wxpaycli/client.go b/library/payclients/wxpaycli/client.go index 15a96da1..3787ace3 100644 --- a/library/payclients/wxpaycli/client.go +++ b/library/payclients/wxpaycli/client.go @@ -34,12 +34,13 @@ const ( AppIdXinYiDaoLe = "1665016206" AppIdTieFenZone = "1675813721" AppIdTieFanZone = "1679775327" + AppIdShuiLaiTF = "1682472761" ) var allWxpayClients = map[string]*WxpayClient{} func GetDefaultWxpayClient() *WxpayClient { - return allWxpayClients[AppIdTieFanZone] + return allWxpayClients[AppIdShuiLaiTF] } type WxpayClient struct { diff --git a/library/payclients/wxpaycli/client_test.go b/library/payclients/wxpaycli/client_test.go index e734cc7e..d9b36cf7 100644 --- a/library/payclients/wxpaycli/client_test.go +++ b/library/payclients/wxpaycli/client_test.go @@ -20,7 +20,7 @@ func TestMain(m *testing.M) { fmt.Printf("%v\n", err) } - err = InitMulti(cfg.Wxpay, cfg.WxpayTieFanZone) + err = InitMulti(cfg.Wxpay, cfg.WxpayTieFanZone, cfg.WxpayShuilaitf) if err != nil { fmt.Println(err) os.Exit(1)