public void TestApproveOrder() { AliOrderHandle order = new AliOrderHandle(); string data = "{ \"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"OrderId\":\"88766926\",\"NgPurId\":\"637018103985963096\",\"Status\":\"dismissed\"}"; order.analyseBussdata("ApproveOrder", data); string ret = order.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); Assert.IsTrue(obj.Value <bool>("success"), obj.Value <string>("message")); }
public void TestQueryOrderDetail() { AliOrderHandle order = new AliOrderHandle(); string data = "{ \"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"OrderId\":\"89275019\"}"; //89139200 order.analyseBussdata("QueryOrderDetail", data); string ret = order.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); Assert.IsTrue(obj.Value <bool>("success"), obj.Value <string>("message")); }
public void TestCreateOrderBySourceId() { AliOrderHandle order = new AliOrderHandle(); string data = CreateTestOrderFromNg();// "{\"AppKey\":\"334362\",\"AppSecret\":\"w5v9Xu2sK2y5\",\"TokenKey\":\"9ee0ac93-0aae-45f5-a671-ca7564280a3a\",\"CompanyCode\":\"1000\",\"NgPurId\":\"318190821000001\",\"NeedSupplierConfirm\":false,\"NeedInvoice\":false,\"OperatorLoginId\":\"dongyl3333:cg000556\",\"QuoteId\":\"1178451390727\",\"Address\":{\"Address\":\"杭州运河\",\"MobilePhone\":\"15478965258\",\"Phone\":\"\",\"Post\":\"\",\"ReceiverName\":\"123\"},\"Details\":[{\"QuoteDetialId\":\"1580108480727\",\"Qty\":12.0,\"DeliveryDate\":null},{\"QuoteDetialId\":\"1580108490727\",\"Qty\":15.0,\"DeliveryDate\":null}]}";// order.analyseBussdata("CreateOrderBySourceId", data); string ret = order.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); //obj = obj.Value<JObject>("result"); Assert.IsTrue(obj.Value <bool>("success"), obj.Value <string>("message")); }
public void TestCreateProcurementOrder() { AliOrderHandle order = new AliOrderHandle(); string data = CreateTestOrder(); order.analyseBussdata("CreateProcurementOrder", data); string ret = order.Post(); JObject obj = JsonConvert.DeserializeObject <JObject>(ret); obj = obj.Value <JObject>("result"); Assert.IsTrue(obj.Value <bool>("success"), obj.Value <string>("message")); }