From 086c45d5d05eb8aa1e4367223a5b454caf514d64 Mon Sep 17 00:00:00 2001 From: mofangmin Date: Wed, 21 Aug 2024 16:59:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E4=B8=BA=E5=85=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pay/eanipay/base.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/pay/eanipay/base.go b/modules/pay/eanipay/base.go index 766532e..483e0fc 100644 --- a/modules/pay/eanipay/base.go +++ b/modules/pay/eanipay/base.go @@ -98,6 +98,7 @@ func (s *Sub) GetResp() (proto.Message, error) { func (s *Sub) PackPayReq() interface{} { r := s.Base.PayReq + r.Amount /= 100 send := &PayReq{ MerchantTradeNo: r.OrderID, Amount: fmt.Sprintf("%d", r.Amount), @@ -119,6 +120,7 @@ func (s *Sub) PackPayReq() interface{} { func (s *Sub) PackWithdrawReq() interface{} { r := s.Base.WithdrawReq + r.Amount /= 100 send := &WithdrawReq{ MerchantTradeNo: r.OrderID, Amount: fmt.Sprintf("%d", r.Amount), From 0bd727b7ebbbe2daefb58f1ed23bd6fe8647eecd Mon Sep 17 00:00:00 2001 From: mofangmin Date: Wed, 21 Aug 2024 18:24:24 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E5=89=8D=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/pay/eanipay/base.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/pay/eanipay/base.go b/modules/pay/eanipay/base.go index 483e0fc..5229633 100644 --- a/modules/pay/eanipay/base.go +++ b/modules/pay/eanipay/base.go @@ -99,6 +99,9 @@ func (s *Sub) GetResp() (proto.Message, error) { func (s *Sub) PackPayReq() interface{} { r := s.Base.PayReq r.Amount /= 100 + if len(r.Phone) == 12 { + r.Phone = r.Phone[2:] + } send := &PayReq{ MerchantTradeNo: r.OrderID, Amount: fmt.Sprintf("%d", r.Amount), @@ -121,6 +124,9 @@ func (s *Sub) PackPayReq() interface{} { func (s *Sub) PackWithdrawReq() interface{} { r := s.Base.WithdrawReq r.Amount /= 100 + if len(r.Phone) == 12 { + r.Phone = r.Phone[2:] + } send := &WithdrawReq{ MerchantTradeNo: r.OrderID, Amount: fmt.Sprintf("%d", r.Amount), From 2758e69aca15923ae78c624811519f41dddd8040 Mon Sep 17 00:00:00 2001 From: mofangmin Date: Wed, 21 Aug 2024 18:24:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=89=93=E5=8C=85=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/build.sh b/cmd/build.sh index 605008f..61a7d07 100644 --- a/cmd/build.sh +++ b/cmd/build.sh @@ -8,4 +8,4 @@ cd pb/proto # go generate cd ../.. #go build main.go -CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o gamserver main.go \ No newline at end of file +CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o gameserver main.go \ No newline at end of file