()
| 30 | } |
| 31 | |
| 32 | func GetEpayClient() *epay.Client { |
| 33 | if setting.PayAddress == "" || setting.EpayId == "" || setting.EpayKey == "" { |
| 34 | return nil |
| 35 | } |
| 36 | withUrl, err := epay.NewClient(&epay.Config{ |
| 37 | PartnerID: setting.EpayId, |
| 38 | Key: setting.EpayKey, |
| 39 | }, setting.PayAddress) |
| 40 | if err != nil { |
| 41 | return nil |
| 42 | } |
| 43 | return withUrl |
| 44 | } |
| 45 | |
| 46 | func getPayMoney(amount int64, group string) float64 { |
| 47 | dAmount := decimal.NewFromInt(amount) |
no outgoing calls
no test coverage detected