Charging.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Newtonsoft.Json.Linq;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Web;
  6. namespace NEducation.Code
  7. {
  8. public class Charging
  9. {
  10. // only for BuyCourse
  11. public string requestId { get; set; }
  12. // only for register sub
  13. public string responseCode { get; set; }
  14. public string requestID { get; set; }
  15. public string cmd { get; set; }
  16. public string money { get; set; }
  17. public string source { get; set; }
  18. public string otpType { get; set; }
  19. public Charging() { }
  20. public Charging(string json)
  21. {
  22. JObject jObject = JObject.Parse(json);
  23. if (jObject != null)
  24. {
  25. responseCode = (string)jObject["responseCode"];
  26. requestId = (string)jObject["requestId"];
  27. requestID = (string)jObject["requestID"];
  28. cmd = (string)jObject["cmd"];
  29. money = (string)jObject["money"];
  30. source = (string)jObject["source"];
  31. otpType = (string)jObject["otpType"];
  32. }
  33. }
  34. }
  35. }