AlipayAuthTokenContentBuilder.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xudong.ding
  5. * Date: 16/5/18
  6. * Time: 下午2:09
  7. */
  8. namespace app\common\services\alipay\f2fpay\model\builder;
  9. class AlipayAuthTokenContentBuilder extends ContentBuilder
  10. {
  11. private $bizContent = NULL;
  12. private $appAuthToken;
  13. private $grantType;
  14. private $code;
  15. private $refreshToken;
  16. private $bizParas = array();
  17. public function __construct()
  18. {
  19. }
  20. public function AlipayTradePayContentBuilder()
  21. {
  22. $this->__construct();
  23. }
  24. public function getBizContent()
  25. {
  26. /*$this->bizContent = "{";
  27. foreach ($this->bizParas as $k=>$v){
  28. $this->bizContent.= "\"".$k."\":\"".$v."\",";
  29. }
  30. $this->bizContent = substr($this->bizContent,0,-1);
  31. $this->bizContent.= "}";*/
  32. if(!empty($this->bizParas)){
  33. $this->bizContent = json_encode($this->bizParas,JSON_UNESCAPED_UNICODE);
  34. }
  35. return $this->bizContent;
  36. }
  37. public function getAppAuthToken()
  38. {
  39. return $this->appAuthToken;
  40. }
  41. public function setAppAuthToken($appAuthToken)
  42. {
  43. $this->appAuthToken = $appAuthToken;
  44. $this->bizParas['app_auth_token'] = $appAuthToken;
  45. }
  46. public function getGrantType()
  47. {
  48. return $this->grantType;
  49. }
  50. public function setGrantType($grantType)
  51. {
  52. $this->grantType = $grantType;
  53. $this->bizParas['grant_type'] = $grantType;
  54. }
  55. public function getCode()
  56. {
  57. return $this->code;
  58. }
  59. public function setCode($code)
  60. {
  61. $this->code = $code;
  62. $this->bizParas['code'] = $code;
  63. }
  64. public function getRefreshToken()
  65. {
  66. return $this->refreshToken;
  67. }
  68. public function setRefreshToken($refreshToken)
  69. {
  70. $this->refreshToken = $refreshToken;
  71. $this->bizParas['refresh_token'] = $refreshToken;
  72. }
  73. }
  74. ?>