public void TestReceiveGoods() { AliOpBulkSettlementHandle handle = new AliOpBulkSettlementHandle(); string data = "{ \"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"SubAccount\":\"dongyl3333\",\"ReceiveDate\":\"2019-08-28\",\"InsideRemark\":\"memo1\",\"OutsideRemark\":\"memo2\",\"ReceivedDetails\":[{\"EntryId\":89275021,\"realQuantity\":3},{\"EntryId\":89275020,\"realQuantity\":5}]}"; handle.analyseBussdata("ReceiveGoods", data); string ret = handle.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); Assert.IsTrue(obj.Value <bool>("success"), obj.Value <string>("message")); }
public void TestQueryReceiveGoods() { AliOpBulkSettlementHandle handle = new AliOpBulkSettlementHandle(); string data = "{\"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"Id\":75142}"; handle.analyseBussdata("QueryReceiveGoods", data); string ret = handle.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); Assert.IsTrue(obj.Value <bool>("success"), obj.Value <string>("message")); }
public void TestReceiveOrder() { AliOpBulkSettlementHandle handle = new AliOpBulkSettlementHandle(); string data = "{\"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"OrderId\":\"88786898\",\"ReceivedDetails\":[{\"orderEntryId\":\"88786900\",\"quantity\":1,\"realQuantity\":1}]}"; handle.analyseBussdata("ReceiveOrder", data); string ret = handle.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); string error = obj.Value <string>("error_message"); Assert.IsFalse(!string.IsNullOrWhiteSpace(error), error); }
public void TestConfirmGoods() { AliOpBulkSettlementHandle handle = new AliOpBulkSettlementHandle(); string data = "{\"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"Code\":\"1001001005\",\"Detials\":[{\"NgPurId\":\"637008587391704596\",\"NgPurDetailId\":\"3001\",\"Qty\":7,\"UntaxPrc\":10,\"UntaxAmt\":70,\"TaxPrc\":12,\"TaxAmt\":84,\"End\":false}]}"; handle.analyseBussdata("ConfirmGoods", data); string ret = handle.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); string error = obj.Value <string>("error_message"); Assert.IsFalse(!string.IsNullOrWhiteSpace(error), error); }