WxPayProfitSharing.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: yunzhong
  5. * Date: 2019/10/8
  6. * Time: 16:41
  7. */
  8. namespace app\common\services\wechat\lib;
  9. use app\common\services\wechat\lib\WxPayConfig;
  10. use app\common\services\wechat\lib\WxPayDataBase;
  11. class WxPayProfitSharing extends WxPayDataBase
  12. {
  13. public function __construct(WxPayConfig $config)
  14. {
  15. $this->values['appid'] = $config->GetAppId();
  16. // $this->values['sub_appid'] = $config->GetSubAppId();
  17. $this->values["mch_id"] = $config->GetMerchantId();
  18. $this->values["sub_mch_id"] = $config->GetSubMerchantId();
  19. }
  20. /**
  21. * 设置随机字符串,不长于32位。推荐随机数生成算法
  22. * @param string $value
  23. **/
  24. public function SetNonce_str($value)
  25. {
  26. $this->values['nonce_str'] = $value;
  27. }
  28. /**
  29. * 获取随机字符串,不长于32位。推荐随机数生成算法的值
  30. * @return 值
  31. **/
  32. public function GetNonce_str()
  33. {
  34. return $this->values['nonce_str'];
  35. }
  36. /**
  37. * 判断随机字符串,不长于32位。推荐随机数生成算法是否存在
  38. * @return true 或 false
  39. **/
  40. public function IsNonce_strSet()
  41. {
  42. return array_key_exists('nonce_str', $this->values);
  43. }
  44. public function SetAppid($value)
  45. {
  46. $this->values['appid'] = $value;
  47. }
  48. public function GetAppid()
  49. {
  50. return $this->values['appid'];
  51. }
  52. public function SetMch_id($value)
  53. {
  54. $this->values['mch_id'] = $value;
  55. }
  56. public function GetMch_id()
  57. {
  58. return $this->values['mch_id'];
  59. }
  60. public function SetSub_mch_id($value)
  61. {
  62. $this->values['sub_mch_id'] = $value;
  63. }
  64. public function GetSub_mch_id()
  65. {
  66. return $this->values['sub_mch_id'];
  67. }
  68. public function GetSubOpenid()
  69. {
  70. return $this->values['sub_openid'];
  71. }
  72. public function SetOpenid($value)
  73. {
  74. $this->values['openid'] = $value;
  75. }
  76. public function GetOpenid()
  77. {
  78. return $this->values['openid'];
  79. }
  80. public function SetSub_openid($value)
  81. {
  82. $this->values['sub_openid'] = $value;
  83. }
  84. public function SetReceiver($value)
  85. {
  86. $this->values['receiver'] = $value;
  87. }
  88. public function GetReceiver()
  89. {
  90. return $this->values['receiver'];
  91. }
  92. public function IsReceiverSet()
  93. {
  94. return array_key_exists('receiver', $this->values);
  95. }
  96. public function SetReceivers($value)
  97. {
  98. $this->values['receivers'] = $value;
  99. }
  100. public function GetReceivers()
  101. {
  102. return $this->values['receivers'];
  103. }
  104. public function IsReceiversSet()
  105. {
  106. return array_key_exists('receivers', $this->values);
  107. }
  108. public function SetTransaction_id($value)
  109. {
  110. $this->values['transaction_id'] = $value;
  111. }
  112. public function GetTransaction_id()
  113. {
  114. return $this->values['transaction_id'];
  115. }
  116. public function IsTransaction_idSet()
  117. {
  118. return array_key_exists('transaction_id', $this->values);
  119. }
  120. public function SetOut_order_no($value)
  121. {
  122. $this->values['out_order_no'] = $value;
  123. }
  124. public function GetOut_order_no()
  125. {
  126. return $this->values['out_order_no'];
  127. }
  128. public function IsOut_order_noSet()
  129. {
  130. return array_key_exists('out_order_no', $this->values);
  131. }
  132. public function SetDescription($value)
  133. {
  134. $this->values['description'] = $value;
  135. }
  136. public function GetDescription()
  137. {
  138. return $this->values['description'];
  139. }
  140. public function IsDescription()
  141. {
  142. return array_key_exists('description', $this->values);
  143. }
  144. }