AlipaySystemOauthTokenRequest.php 2.5 KB

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