AlipayInitializeContentBuilder.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 AlipayInitializeContentBuilder extends ContentBuilder
  10. {
  11. private $bizContent = NULL;
  12. private $zimMetaInfo;
  13. private $appAuthToken;
  14. private $grantType;
  15. private $bizParas = array();
  16. public function __construct()
  17. {
  18. }
  19. public function AlipayTradePayContentBuilder()
  20. {
  21. $this->__construct();
  22. }
  23. public function getBizContent()
  24. {
  25. /*$this->bizContent = "{";
  26. foreach ($this->bizParas as $k=>$v){
  27. $this->bizContent.= "\"".$k."\":\"".$v."\",";
  28. }
  29. $this->bizContent = substr($this->bizContent,0,-1);
  30. $this->bizContent.= "}";*/
  31. if(!empty($this->bizParas)){
  32. $this->bizContent = json_encode($this->bizParas,JSON_UNESCAPED_UNICODE);
  33. }
  34. return $this->bizContent;
  35. }
  36. public function getAppAuthToken()
  37. {
  38. return $this->appAuthToken;
  39. }
  40. public function setAppAuthToken($appAuthToken)
  41. {
  42. $this->appAuthToken = $appAuthToken;
  43. $this->bizParas['app_auth_token'] = $appAuthToken;
  44. }
  45. public function getGrantType()
  46. {
  47. return $this->grantType;
  48. }
  49. public function setGrantType($grantType)
  50. {
  51. $this->grantType = $grantType;
  52. $this->bizParas['grant_type'] = $grantType;
  53. }
  54. public function getZimMetaInfo()
  55. {
  56. return $this->zimMetaInfo;
  57. }
  58. public function setZimMetaInfo($zimMetaInfo)
  59. {
  60. $this->zimMetaInfo = $zimMetaInfo;
  61. $this->bizParas['zimmetainfo'] = $zimMetaInfo;
  62. }
  63. }
  64. ?>