AlipayConfig.php 5.1 KB

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