From e710c3050a43ba2c46347e5653cdf95b12228ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=8E=E7=82=9C=20=E5=8D=A2?= <307958040@qq.com> Date: Tue, 4 Jun 2024 11:24:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84pay=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B7=A5=E5=8D=95=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=8E=A5=E5=8F=A3=E3=80=81=E5=9B=9E=E5=A4=8D=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=81=E5=AE=8C=E6=88=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/pay/client.go | 14 ++++++++++---- services/pay/client_test.go | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/services/pay/client.go b/services/pay/client.go index 04f2e39..42edac3 100644 --- a/services/pay/client.go +++ b/services/pay/client.go @@ -10,12 +10,12 @@ const ( ) var HOST requests.Host = requests.Host{ - Default: "pay.gaore.com", + Default: "pay.uu89.com", Func: func(s string) string { var a = map[string]string{ - requests.RELEASE: "pay.gaore.com", - requests.PRE: "pay.gaore.com", - requests.TEST: "pay.gaore.com", + requests.RELEASE: "pay.uu89.com", + requests.PRE: "pay.uu89.com", + requests.TEST: "pay.uu89.com", } return a[s] }, @@ -25,6 +25,12 @@ type Client struct { sdk.Client } +func NewClient() (client *Client, err error) { + client = new(Client) + err = client.Init() + return +} + func NewClientWithAccessKey(accesskey, secrect, source string) (client *Client, err error) { client = &Client{} err = client.InitWithAccessKey(accesskey, secrect, source) diff --git a/services/pay/client_test.go b/services/pay/client_test.go index c92c103..90cea14 100644 --- a/services/pay/client_test.go +++ b/services/pay/client_test.go @@ -8,7 +8,7 @@ import ( func TestClient_GetUserInfo(t *testing.T) { - c, err := NewClientWithAliAppcode("", "") + c, err := NewClient() if err != nil { t.Error(err) }