diff --git a/cmd/build.sh b/cmd/build.sh index f3a9daa..61a7d07 100644 --- a/cmd/build.sh +++ b/cmd/build.sh @@ -8,5 +8,4 @@ cd pb/proto # go generate cd ../.. #go build main.go -#CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o gameserver main.go -CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o indiaprovider 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 diff --git a/modules/pay/eanipay/base.go b/modules/pay/eanipay/base.go index 766532e..5229633 100644 --- a/modules/pay/eanipay/base.go +++ b/modules/pay/eanipay/base.go @@ -98,6 +98,10 @@ 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), @@ -119,6 +123,10 @@ 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),