From 0bd727b7ebbbe2daefb58f1ed23bd6fe8647eecd Mon Sep 17 00:00:00 2001 From: mofangmin Date: Wed, 21 Aug 2024 18:24:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=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),