|
|
|
@ -99,6 +99,9 @@ func (s *Sub) GetResp() (proto.Message, error) { |
|
|
|
func (s *Sub) PackPayReq() interface{} { |
|
|
|
func (s *Sub) PackPayReq() interface{} { |
|
|
|
r := s.Base.PayReq |
|
|
|
r := s.Base.PayReq |
|
|
|
r.Amount /= 100 |
|
|
|
r.Amount /= 100 |
|
|
|
|
|
|
|
if len(r.Phone) == 12 { |
|
|
|
|
|
|
|
r.Phone = r.Phone[2:] |
|
|
|
|
|
|
|
} |
|
|
|
send := &PayReq{ |
|
|
|
send := &PayReq{ |
|
|
|
MerchantTradeNo: r.OrderID, |
|
|
|
MerchantTradeNo: r.OrderID, |
|
|
|
Amount: fmt.Sprintf("%d", r.Amount), |
|
|
|
Amount: fmt.Sprintf("%d", r.Amount), |
|
|
|
@ -121,6 +124,9 @@ func (s *Sub) PackPayReq() interface{} { |
|
|
|
func (s *Sub) PackWithdrawReq() interface{} { |
|
|
|
func (s *Sub) PackWithdrawReq() interface{} { |
|
|
|
r := s.Base.WithdrawReq |
|
|
|
r := s.Base.WithdrawReq |
|
|
|
r.Amount /= 100 |
|
|
|
r.Amount /= 100 |
|
|
|
|
|
|
|
if len(r.Phone) == 12 { |
|
|
|
|
|
|
|
r.Phone = r.Phone[2:] |
|
|
|
|
|
|
|
} |
|
|
|
send := &WithdrawReq{ |
|
|
|
send := &WithdrawReq{ |
|
|
|
MerchantTradeNo: r.OrderID, |
|
|
|
MerchantTradeNo: r.OrderID, |
|
|
|
Amount: fmt.Sprintf("%d", r.Amount), |
|
|
|
Amount: fmt.Sprintf("%d", r.Amount), |
|
|
|
|