AlipayConfig.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <?php
  2. namespace addons\Alitopay\common\jdk\alipay;
  3. class AlipayConfig
  4. {
  5. /**
  6. * 网关地址
  7. * 线上:https://openapi.alipay.com/gateway.do
  8. * 沙箱:https://openapi.alipaydev.com/gateway.do
  9. */
  10. private $serverUrl;
  11. /**
  12. * 开放平台上创建的应用的ID
  13. */
  14. private $appId;
  15. /**
  16. * 报文格式,推荐:json
  17. */
  18. private $format = "json";
  19. /**
  20. * 字符串编码,推荐:utf-8
  21. */
  22. private $charset = "utf-8";
  23. /**
  24. * 签名算法类型,推荐:RSA2
  25. */
  26. private $signType = "RSA2";
  27. /**
  28. * 商户私钥
  29. */
  30. private $privateKey;
  31. /**
  32. * 支付宝公钥字符串(公钥模式下设置,证书模式下无需设置)
  33. */
  34. private $alipayPublicKey;
  35. /**
  36. * 商户应用公钥证书路径(证书模式下设置,公钥模式下无需设置)
  37. */
  38. private $appCertPath;
  39. /**
  40. * 支付宝公钥证书路径(证书模式下设置,公钥模式下无需设置)
  41. */
  42. private $alipayPublicCertPath;
  43. /**
  44. * 支付宝根证书路径(证书模式下设置,公钥模式下无需设置)
  45. */
  46. private $rootCertPath;
  47. /**
  48. * 指定商户公钥应用证书内容字符串,该字段与appCertPath只需指定一个,优先以该字段的值为准(证书模式下设置,公钥模式下无需设置)
  49. */
  50. private $appCertContent;
  51. /**
  52. * 指定支付宝公钥证书内容字符串,该字段与alipayPublicCertPath只需指定一个,优先以该字段的值为准(证书模式下设置,公钥模式下无需设置)
  53. */
  54. private $alipayPublicCertContent;
  55. /**
  56. * 指定根证书内容字符串,该字段与rootCertPath只需指定一个,优先以该字段的值为准(证书模式下设置,公钥模式下无需设置)
  57. */
  58. private $rootCertContent;
  59. /**
  60. * 敏感信息对称加密算法类型,推荐:AES
  61. */
  62. private $encryptType = "AES";
  63. /**
  64. * 敏感信息对称加密算法密钥
  65. */
  66. private $encryptKey;
  67. public function getServerUrl()
  68. {
  69. return $this->serverUrl;
  70. }
  71. public function setServerUrl($serverUrl)
  72. {
  73. $this->serverUrl = $serverUrl;
  74. }
  75. public function getAppId()
  76. {
  77. return $this->appId;
  78. }
  79. public function setAppId($appId)
  80. {
  81. $this->appId = $appId;
  82. }
  83. public function getFormat()
  84. {
  85. return $this->format;
  86. }
  87. public function setFormat($format)
  88. {
  89. $this->format = $format;
  90. }
  91. public function getCharset()
  92. {
  93. return $this->charset;
  94. }
  95. public function setCharset($charset)
  96. {
  97. $this->charset = $charset;
  98. }
  99. public function getSignType()
  100. {
  101. return $this->signType;
  102. }
  103. public function setSignType($signType)
  104. {
  105. $this->signType = $signType;
  106. }
  107. public function getEncryptKey()
  108. {
  109. return $this->encryptKey;
  110. }
  111. public function setEncryptKey($encryptKey)
  112. {
  113. $this->encryptKey = $encryptKey;
  114. }
  115. public function getEncryptType()
  116. {
  117. return $this->encryptType;
  118. }
  119. public function setEncryptType($encryptType)
  120. {
  121. $this->encryptType = $encryptType;
  122. }
  123. public function getPrivateKey()
  124. {
  125. return $this->privateKey;
  126. }
  127. public function setPrivateKey($privateKey)
  128. {
  129. $this->privateKey = $privateKey;
  130. }
  131. public function getAlipayPublicKey()
  132. {
  133. return $this->alipayPublicKey;
  134. }
  135. public function setAlipayPublicKey($alipayPublicKey)
  136. {
  137. $this->alipayPublicKey = $alipayPublicKey;
  138. }
  139. public function getAppCertPath()
  140. {
  141. return $this->appCertPath;
  142. }
  143. public function setAppCertPath($appCertPath)
  144. {
  145. $this->appCertPath = $appCertPath;
  146. }
  147. public function getAlipayPublicCertPath()
  148. {
  149. return $this->alipayPublicCertPath;
  150. }
  151. public function setAlipayPublicCertPath($alipayPublicCertPath)
  152. {
  153. $this->alipayPublicCertPath = $alipayPublicCertPath;
  154. }
  155. public function getRootCertPath()
  156. {
  157. return $this->rootCertPath;
  158. }
  159. public function setRootCertPath($rootCertPath)
  160. {
  161. $this->rootCertPath = $rootCertPath;
  162. }
  163. public function getAppCertContent()
  164. {
  165. return $this->appCertContent;
  166. }
  167. public function setAppCertContent($appCertContent)
  168. {
  169. $this->appCertContent = $appCertContent;
  170. }
  171. public function getAlipayPublicCertContent()
  172. {
  173. return $this->alipayPublicCertContent;
  174. }
  175. public function setAlipayPublicCertContent($alipayPublicCertContent)
  176. {
  177. $this->alipayPublicCertContent = $alipayPublicCertContent;
  178. }
  179. public function getRootCertContent()
  180. {
  181. return $this->rootCertContent;
  182. }
  183. public function setRootCertContent($rootCertContent)
  184. {
  185. $this->rootCertContent = $rootCertContent;
  186. }
  187. }