Response.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?php
  2. namespace addons\JoinPay\common\logic\entity;
  3. /**
  4. * 响应参数类
  5. * Class Response
  6. * @package entity
  7. */
  8. class Response {
  9. private $resp_code;
  10. private $biz_code;
  11. private $biz_msg;
  12. private $mch_no;
  13. private $data;
  14. private $rand_str;
  15. private $sign_type;
  16. private $sign;
  17. private $sec_key;
  18. /**
  19. * @return mixed
  20. */
  21. public function getRespCode()
  22. {
  23. return $this->resp_code;
  24. }
  25. /**
  26. * @param mixed $resp_code
  27. */
  28. public function setRespCode($resp_code): void
  29. {
  30. $this->resp_code = $resp_code;
  31. }
  32. /**
  33. * @return mixed
  34. */
  35. public function getBizCode()
  36. {
  37. return $this->biz_code;
  38. }
  39. /**
  40. * @param mixed $biz_code
  41. */
  42. public function setBizCode($biz_code): void
  43. {
  44. $this->biz_code = $biz_code;
  45. }
  46. /**
  47. * @return mixed
  48. */
  49. public function getBizMsg()
  50. {
  51. return $this->biz_msg;
  52. }
  53. /**
  54. * @param mixed $biz_msg
  55. */
  56. public function setBizMsg($biz_msg): void
  57. {
  58. $this->biz_msg = $biz_msg;
  59. }
  60. /**
  61. * @return mixed
  62. */
  63. public function getMchNo()
  64. {
  65. return $this->mch_no;
  66. }
  67. /**
  68. * @param mixed $mch_no
  69. */
  70. public function setMchNo($mch_no): void
  71. {
  72. $this->mch_no = $mch_no;
  73. }
  74. /**
  75. * @return mixed
  76. */
  77. public function getData()
  78. {
  79. return $this->data;
  80. }
  81. /**
  82. * @param mixed $data
  83. */
  84. public function setData($data): void
  85. {
  86. $this->data = $data;
  87. }
  88. /**
  89. * @return mixed
  90. */
  91. public function getRandStr()
  92. {
  93. return $this->rand_str;
  94. }
  95. /**
  96. * @param mixed $rand_str
  97. */
  98. public function setRandStr($rand_str): void
  99. {
  100. $this->rand_str = $rand_str;
  101. }
  102. /**
  103. * @return mixed
  104. */
  105. public function getSignType()
  106. {
  107. return $this->sign_type;
  108. }
  109. /**
  110. * @param mixed $sign_type
  111. */
  112. public function setSignType($sign_type): void
  113. {
  114. $this->sign_type = $sign_type;
  115. }
  116. /**
  117. * @return mixed
  118. */
  119. public function getSign()
  120. {
  121. return $this->sign;
  122. }
  123. /**
  124. * @param mixed $sign
  125. */
  126. public function setSign($sign): void
  127. {
  128. $this->sign = $sign;
  129. }
  130. /**
  131. * @return mixed
  132. */
  133. public function getSecKey()
  134. {
  135. return $this->sec_key;
  136. }
  137. /**
  138. * @param mixed $sec_key
  139. */
  140. public function setSecKey($sec_key): void
  141. {
  142. $this->sec_key = $sec_key;
  143. }
  144. /**
  145. * 判断本次请求是否成功
  146. * @return bool
  147. */
  148. public function isSuccess(): bool
  149. {
  150. return "SUCCESS" === $this->resp_code && "JS000000" === $this->biz_code;
  151. }
  152. }