a
This commit is contained in:
@@ -4,9 +4,10 @@ import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/alipayapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"golang.org/x/text/encoding/simplifiedchinese"
|
||||
"golang.org/x/text/transform"
|
||||
@@ -769,8 +770,15 @@ func TestUpdateStatus(t *testing.T) {
|
||||
//fmt.Println(int2h8l8(int64(len("fd003401005b76325dc8d5d5d5cfe3c2afc9fad7cfd1cca3acd2a3bfb4c6d9b2bcb9d2c7b0b4a8a3acb7c9c1f7d6b1cfc2c8fdc7a7b3dfa3acd2c9cac7d2f8bad3c2e4bec5ccec") / 2)))
|
||||
//fmt.Println(hex.EncodeToString(data))
|
||||
//fmt.Println(fmt.Sprintf("%x", len("fd003401005b76325dc8d5d5d5cfe3c2afc9fad7cfd1cca3acd2a3bfb4c6d9b2bcb9d2c7b0b4a8a3acb7c9c1f7d6b1cfc2c8fdc7a7b3dfa3acd2c9cac7d2f8bad3c2e4bec5ccec")/2))
|
||||
str := "AA0D5ABE801F11E98489525400AE46A6e10adc3949ba59abbe56e057f20f883e"
|
||||
fmt.Println(fmt.Sprintf("%x", sha1.Sum([]byte(str))))
|
||||
mobile := &alipayapi.KeyMobile{}
|
||||
data, _ := base64.StdEncoding.DecodeString("QWja44PbYifX70Y74N3PU2dG2VedZFqqeXJhXV8g9cALnCOyXt25K6z2RQtAXlJR")
|
||||
key, _ := base64.StdEncoding.DecodeString("GHp3ojlVYRRu2XID4FX2ew==")
|
||||
iv := []byte{}
|
||||
iv = append(iv, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
if result, err := utils.AESCBCDecpryt(data, key, iv); err == nil && result != nil {
|
||||
json.Unmarshal(result, &mobile)
|
||||
}
|
||||
fmt.Println(utils.Format4Output(mobile, true))
|
||||
}
|
||||
|
||||
func sss() (data2 []byte) {
|
||||
|
||||
@@ -75,7 +75,7 @@ func TestGetPrinterStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDoPrint(t *testing.T) {
|
||||
result, err := api.DoPrint("20210615000010", "<center>测试一下</center>", 1)
|
||||
result, err := api.DoPrint("20210615000010", "<center>测试一下</center><br>", 2)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ func (a *API) BatchQueryCardInfo(pageNum int) (batchQueryCardInfoResult *BatchQu
|
||||
}
|
||||
|
||||
type IotDataResult struct {
|
||||
SyncStatus string `json:"sync_status"`
|
||||
SyncStatus string `json:"sync_status"` // 1 未同步, 2已同步
|
||||
CardFlow string `json:"card_flow"`
|
||||
CreateTime string `json:"create_time"`
|
||||
SyncTime string `json:"sync_time"`
|
||||
|
||||
@@ -20,6 +20,7 @@ const (
|
||||
|
||||
sigKey = "sign"
|
||||
PayTypeWxXcx = "W06"
|
||||
PayTypeWxCode = "W01"
|
||||
PayTypeZfbApp = "A03"
|
||||
PayTypeZfbQrcode = "A01"
|
||||
PayTypeZfbJS = "A02"
|
||||
|
||||
Reference in New Issue
Block a user