Dim st As New Date(1970,1,1,8,0,0)
Dim timestamp As Integer = CInt((Date.Now - st).TotalSeconds()) '时间戳
Dim sign As String
sign = "37065939" & timestamp & "4720B7ECFFB94CF3" '应用ID和应用密匙
'output.show(sign)
Dim url As String = "https://sdk.nuonuo.com/open/v1/services"
Dim appKey As String = "37065939"
Dim appSecret As String = "4720B7ECFFB94CF3"
Dim taxnum As String = "92331024MA2DY5HN8K"
Dim accecctoken As String = sign
Dim senid As String = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 32)
Dim method As String = "nuonuo.electronInvoice.queryInvoiceQuantity" '开piao量查找
Dim jo As New JObject
jo("invoiceTimeEnd") = "2020-10-23 22:59:59"
jo("taxnum") = taxnum
jo("invoiceTimeStart") = "2020-03-19 00:00:00"
'msgbox(jo.ToString)
Dim content As String = jo.ToString
Dim result As String = NuonuoSDK.NNOpenSDK.sendPostSyncRequest(url, senid, appKey, appSecret, accecctoken, taxnum, method, content)
output.show(result)
运行结果 很奇怪,不知道错哪里了,appKey和appSecret 都是正确的
{"code":"070301", "describe":"accessToken不匹配/或appKey不匹配"}