AlipaySystemOauthTokenRequest.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?php
  2. /**
  3. * ALIPAY API: alipay.system.oauth.token request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2018-06-13 16:36:59
  7. */
  8. class AlipaySystemOauthTokenRequest
  9. {
  10. /**
  11. * 授权码,用户对应用授权后得到。
  12. **/
  13. private $code;
  14. /**
  15. * 值为authorization_code时,代表用code换取;值为refresh_token时,代表用refresh_token换取
  16. **/
  17. private $grantType;
  18. /**
  19. * 刷新令牌,上次换取访问令牌时得到。见出参的refresh_token字段
  20. **/
  21. private $refreshToken;
  22. private $apiParas = array();
  23. private $terminalType;
  24. private $terminalInfo;
  25. private $prodCode;
  26. private $apiVersion="1.0";
  27. private $notifyUrl;
  28. private $returnUrl;
  29. private $needEncrypt=false;
  30. public function setCode($code)
  31. {
  32. $this->code = $code;
  33. $this->apiParas["code"] = $code;
  34. }
  35. public function getCode()
  36. {
  37. return $this->code;
  38. }
  39. public function setGrantType($grantType)
  40. {
  41. $this->grantType = $grantType;
  42. $this->apiParas["grant_type"] = $grantType;
  43. }
  44. public function getGrantType()
  45. {
  46. return $this->grantType;
  47. }
  48. public function setRefreshToken($refreshToken)
  49. {
  50. $this->refreshToken = $refreshToken;
  51. $this->apiParas["refresh_token"] = $refreshToken;
  52. }
  53. public function getRefreshToken()
  54. {
  55. return $this->refreshToken;
  56. }
  57. public function getApiMethodName()
  58. {
  59. return "alipay.system.oauth.token";
  60. }
  61. public function setNotifyUrl($notifyUrl)
  62. {
  63. $this->notifyUrl=$notifyUrl;
  64. }
  65. public function getNotifyUrl()
  66. {
  67. return $this->notifyUrl;
  68. }
  69. public function setReturnUrl($returnUrl)
  70. {
  71. $this->returnUrl=$returnUrl;
  72. }
  73. public function getReturnUrl()
  74. {
  75. return $this->returnUrl;
  76. }
  77. public function getApiParas()
  78. {
  79. return $this->apiParas;
  80. }
  81. public function getTerminalType()
  82. {
  83. return $this->terminalType;
  84. }
  85. public function setTerminalType($terminalType)
  86. {
  87. $this->terminalType = $terminalType;
  88. }
  89. public function getTerminalInfo()
  90. {
  91. return $this->terminalInfo;
  92. }
  93. public function setTerminalInfo($terminalInfo)
  94. {
  95. $this->terminalInfo = $terminalInfo;
  96. }
  97. public function getProdCode()
  98. {
  99. return $this->prodCode;
  100. }
  101. public function setProdCode($prodCode)
  102. {
  103. $this->prodCode = $prodCode;
  104. }
  105. public function setApiVersion($apiVersion)
  106. {
  107. $this->apiVersion=$apiVersion;
  108. }
  109. public function getApiVersion()
  110. {
  111. return $this->apiVersion;
  112. }
  113. public function setNeedEncrypt($needEncrypt)
  114. {
  115. $this->needEncrypt=$needEncrypt;
  116. }
  117. public function getNeedEncrypt()
  118. {
  119. return $this->needEncrypt;
  120. }
  121. }