Request.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. namespace addons\JoinPay\common\logic\entity;
  3. /**
  4. * 请求参数类
  5. * Class Request
  6. * @package entity
  7. */
  8. class Request implements \JsonSerializable {
  9. private $method;
  10. private $version = "1.0";
  11. private $data;
  12. private $rand_str;
  13. private $sign_type = "2";
  14. private $mch_no;
  15. private $sign;
  16. private $sec_key;
  17. public function jsonSerialize()
  18. {
  19. $vars = get_object_vars($this);
  20. return $vars;
  21. }
  22. /**
  23. * @return mixed
  24. */
  25. public function getMethod()
  26. {
  27. return $this->method;
  28. }
  29. /**
  30. * @param mixed $method
  31. */
  32. public function setMethod($method): void
  33. {
  34. $this->method = $method;
  35. }
  36. /**
  37. * @return mixed
  38. */
  39. public function getVersion()
  40. {
  41. return $this->version;
  42. }
  43. /**
  44. * @param mixed $version
  45. */
  46. public function setVersion($version): void
  47. {
  48. $this->version = $version;
  49. }
  50. /**
  51. * @return mixed
  52. */
  53. public function getData()
  54. {
  55. return $this->data;
  56. }
  57. /**
  58. * @param mixed $data
  59. */
  60. public function setData($data): void
  61. {
  62. $this->data = $data;
  63. }
  64. /**
  65. * @return mixed
  66. */
  67. public function getRandStr()
  68. {
  69. return $this->rand_str;
  70. }
  71. /**
  72. * @param mixed $rand_str
  73. */
  74. public function setRandStr($rand_str): void
  75. {
  76. $this->rand_str = $rand_str;
  77. }
  78. /**
  79. * @return mixed
  80. */
  81. public function getSignType()
  82. {
  83. return $this->sign_type;
  84. }
  85. /**
  86. * @param mixed $sign_type
  87. */
  88. public function setSignType($sign_type): void
  89. {
  90. $this->sign_type = $sign_type;
  91. }
  92. /**
  93. * @return mixed
  94. */
  95. public function getMchNo()
  96. {
  97. return $this->mch_no;
  98. }
  99. /**
  100. * @param mixed $mch_no
  101. */
  102. public function setMchNo($mch_no): void
  103. {
  104. $this->mch_no = $mch_no;
  105. }
  106. /**
  107. * @return mixed
  108. */
  109. public function getSign()
  110. {
  111. return $this->sign;
  112. }
  113. /**
  114. * @param mixed $sign
  115. */
  116. public function setSign($sign): void
  117. {
  118. $this->sign = $sign;
  119. }
  120. /**
  121. * @return mixed
  122. */
  123. public function getSecKey()
  124. {
  125. return $this->sec_key;
  126. }
  127. /**
  128. * @param mixed $sec_key
  129. */
  130. public function setSecKey($sec_key): void
  131. {
  132. $this->sec_key = $sec_key;
  133. }
  134. }