CompanyAuthH5PageRequest.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <?php
  2. /**
  3. * 获取h5企业认证页面
  4. */
  5. class CompanyAuthH5PageRequest extends SdkRequest {
  6. const REQUEST_URL = "/companyauth/h5page";
  7. private $companyName; // 待认证公司名称
  8. private $applicant; // 认证提交人,企业认证通过后,认证提交人会自动成为该企业的系统管理员
  9. private $registerNo; // 待认证公司注册号
  10. private $legalPerson; // 待认证公司法人姓名
  11. private $callbackUrl; // 认证回调地址
  12. private $closeButton; // 是否显示关闭按钮,默认为true
  13. /**
  14. * CompanyAuthH5PageRequest constructor.
  15. * @param $companyName
  16. * @param $applicant
  17. */
  18. public function __construct($companyName, $applicant) {
  19. $this->companyName = $companyName;
  20. $this->applicant = $applicant;
  21. }
  22. function getUrl() {
  23. return self::REQUEST_URL;
  24. }
  25. function getHttpParamers() {
  26. $paramSwitcher = ParamSwitcher::instanceParam();
  27. $paramSwitcher->addParam('companyName', $this->companyName);
  28. $paramSwitcher->addParam('applicant', $this->applicant);
  29. $paramSwitcher->addParam('registerNo', $this->registerNo);
  30. $paramSwitcher->addParam('legalPerson', $this->legalPerson);
  31. $paramSwitcher->addParam('callbackUrl',$this->callbackUrl);
  32. if($this->closeButton == null){
  33. $paramSwitcher->addParam('closeButton', true);
  34. }else{
  35. $paramSwitcher->addParam('closeButton', $this->closeButton);
  36. }
  37. $httpParameter = HttpParameter::httpPostParamer();
  38. $httpParameter->setJsonParams(json_encode($paramSwitcher->getParams()));
  39. return $httpParameter;
  40. }
  41. /**
  42. * @return mixed
  43. */
  44. public function getCompanyName()
  45. {
  46. return $this->companyName;
  47. }
  48. /**
  49. * @param mixed $companyName
  50. */
  51. public function setCompanyName($companyName)
  52. {
  53. $this->companyName = $companyName;
  54. }
  55. /**
  56. * @return mixed
  57. */
  58. public function getApplicant()
  59. {
  60. return $this->applicant;
  61. }
  62. /**
  63. * @param mixed $applicant
  64. */
  65. public function setApplicant($applicant)
  66. {
  67. $this->applicant = $applicant;
  68. }
  69. /**
  70. * @return mixed
  71. */
  72. public function getRegisterNo()
  73. {
  74. return $this->registerNo;
  75. }
  76. /**
  77. * @param mixed $registerNo
  78. */
  79. public function setRegisterNo($registerNo)
  80. {
  81. $this->registerNo = $registerNo;
  82. }
  83. /**
  84. * @return mixed
  85. */
  86. public function getLegalPerson()
  87. {
  88. return $this->legalPerson;
  89. }
  90. /**
  91. * @param mixed $legalPerson
  92. */
  93. public function setLegalPerson($legalPerson)
  94. {
  95. $this->legalPerson = $legalPerson;
  96. }
  97. /**
  98. * @return mixed
  99. */
  100. public function getCallbackUrl()
  101. {
  102. return $this->callbackUrl;
  103. }
  104. /**
  105. * @param mixed $callbackUrl
  106. */
  107. public function setCallbackUrl($callbackUrl)
  108. {
  109. $this->callbackUrl = $callbackUrl;
  110. }
  111. /**
  112. * @return mixed
  113. */
  114. public function getCloseButton()
  115. {
  116. return $this->closeButton;
  117. }
  118. /**
  119. * @param mixed $closeButton
  120. */
  121. public function setCloseButton($closeButton)
  122. {
  123. $this->closeButton = $closeButton;
  124. }
  125. }