28 lines
725 B
Go
28 lines
725 B
Go
package api
|
|
|
|
import (
|
|
"git.rosy.net.cn/baseapi/platformapi/tibiotapi"
|
|
"git.rosy.net.cn/baseapi/platformapi/tonglianpayapi"
|
|
"git.rosy.net.cn/jx-print/globals"
|
|
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
|
|
)
|
|
|
|
var (
|
|
SMSClient *aliyunsmsclient.SmsClient
|
|
|
|
TibiotAPI *tibiotapi.API
|
|
TLpayAPI *tonglianpayapi.API //通联收银宝api
|
|
)
|
|
|
|
func init() {
|
|
globals.SugarLogger.Debugf("init api...")
|
|
Init() // 这里必须要调用
|
|
}
|
|
|
|
// 这样写的原因是在测试时,可以重新读取配置文件
|
|
func Init() {
|
|
TibiotAPI = tibiotapi.New("ruoxikeji", "Ruoxi@369")
|
|
SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
|
|
TLpayAPI = tonglianpayapi.New("00183083", "18048531223", "56065105499TVAH")
|
|
}
|