- ebaiapi.OrderIdConvert
- elmapi.GetAllOrders
This commit is contained in:
@@ -23,7 +23,7 @@ func init() {
|
||||
// sandbox
|
||||
elmapi = New("623c0904c0d2499e83df15b62902eb65", "RwT214gAsS", "56afff4b9ebd8a7eb532d18fa33f17be57f9b9db", false)
|
||||
// prod
|
||||
// elmapi = New("fee89f45d06f93037dd314ceb78fde7b", "KLRDcOZGrk", "1fc221f8265506531da36fb613d5f5ad673f2e9a", true)
|
||||
// elmapi = New("cf5710018b46e75145eb0f19900bcecd", "KLRDcOZGrk", "1fc221f8265506531da36fb613d5f5ad673f2e9a", true)
|
||||
}
|
||||
|
||||
func TestTest(t *testing.T) {
|
||||
@@ -43,18 +43,6 @@ func TestAccessAPI(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetOrder(t *testing.T) {
|
||||
result, err := elmapi.GetOrder("3023582487561731159")
|
||||
if err != nil {
|
||||
t.Fatalf("Error when accessing AccessJDQuery result:%v, error:%v", result, err)
|
||||
} else {
|
||||
shopId := int(utils.MustInterface2Int64(result["shopId"]))
|
||||
if shopId != 157451615 {
|
||||
t.Fatalf("userId is not correct:%v", shopId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestCallbackSign(t *testing.T) {
|
||||
jsonStr := `{"requestId":"200016348669063447","type":18,"appId":78247922,"message":"{\"orderId\":\"3024923917769149510\",\"state\":\"settled\",\"shopId\":157492364,\"updateTime\":1529465510,\"role\":1}","shopId":157492364,"timestamp":1529465510255,"signature":"D65F917D93B4F599B85486C799599141","userId":336072266322770688}`
|
||||
msg, response := elmapi.GetCallbackMsg([]byte(jsonStr))
|
||||
|
||||
Reference in New Issue
Block a user