From 2b28847520fd9e4088d60cec7a53ed78b69aca47 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Mon, 3 Apr 2023 10:47:14 +0800 Subject: [PATCH] trtc config --- debug.ini | 3 +++ domain/service/group_s/group_op.go | 3 ++- local.ini | 3 +++ release.ini | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debug.ini b/debug.ini index 976183c..4c5ff45 100644 --- a/debug.ini +++ b/debug.ini @@ -72,6 +72,9 @@ APP_CERTIFICATE=ff29c100a613433db82324e8411eabc8 CUSTOMER_KEY=6b132c0ff7164560a2bc53fda06ea85a CUSTOMER_SECRET=eedad2cd16d24834990d5450ace9f1ce CALLBACK_SECRET=n_ZizS_N8 +[TRTC] +APP_ID=1400548270 +APP_CERTIFICATE=321bd60f73096b059c7350f1cd97d51028850b34fa58c5c0d26bb4a19e783de8 [CHECKOUT] AUTHORIZATION=sk_test_9b5e771c-5a3f-4a8d-a4da-31b19bd43d83 URL=https://api.sandbox.checkout.com/hosted-payments diff --git a/domain/service/group_s/group_op.go b/domain/service/group_s/group_op.go index e282e33..197b1ca 100644 --- a/domain/service/group_s/group_op.go +++ b/domain/service/group_s/group_op.go @@ -6,6 +6,7 @@ import ( "fmt" "git.hilo.cn/hilo-common/domain" "git.hilo.cn/hilo-common/mylogrus" + "git.hilo.cn/hilo-common/resource/config" "git.hilo.cn/hilo-common/resource/mysql" "git.hilo.cn/hilo-common/resource/redisCli" "git.hilo.cn/hilo-common/rpc" @@ -174,7 +175,7 @@ func (s *GroupService) GroupIn(userId uint64, externalId string, groupUuid strin } if provider == group_e.GroupProvider_TRTC { channelId = groupInfo.ChannelId - token = trtc.CreateGroupTRTCUserSig(userId) + token = trtc.CreateGroupTRTCUserSig(userId, config.GetTRTCConfig()) } else { channelId, token, err = agora.CreateGroupAgora(groupInfo.ChannelId, uint32(userId)) } diff --git a/local.ini b/local.ini index d46aed4..94db393 100644 --- a/local.ini +++ b/local.ini @@ -72,6 +72,9 @@ APP_CERTIFICATE=ff29c100a613433db82324e8411eabc8 CUSTOMER_KEY=6b132c0ff7164560a2bc53fda06ea85a CUSTOMER_SECRET=eedad2cd16d24834990d5450ace9f1ce CALLBACK_SECRET=n_ZizS_N8 +[TRTC] +APP_ID=1400548270 +APP_CERTIFICATE=321bd60f73096b059c7350f1cd97d51028850b34fa58c5c0d26bb4a19e783de8 [CHECKOUT] AUTHORIZATION=sk_test_9b5e771c-5a3f-4a8d-a4da-31b19bd43d83 URL=https://api.sandbox.checkout.com/hosted-payments diff --git a/release.ini b/release.ini index 4e7a568..404c42b 100644 --- a/release.ini +++ b/release.ini @@ -72,6 +72,9 @@ APP_ID=6291d069123642d9929a49c734c50719 APP_CERTIFICATE=d5de40350aa54e60bcdce90c71e9598a CUSTOMER_KEY=6b132c0ff7164560a2bc53fda06ea85a CUSTOMER_SECRET=eedad2cd16d24834990d5450ace9f1ce +[TRTC] +APP_ID= +APP_CERTIFICATE= [CHECKOUT] AUTHORIZATION=sk_fca6e213-b7df-4bd7-99f4-7c0a9f7c778c URL=https://api.checkout.com/hosted-payments -- 2.22.0