config.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. class Config{
  3. /**
  4. * 达达开发者app_key
  5. */
  6. public $app_key = 'dadaf2279d901a5ba40';
  7. /**
  8. * 达达开发者app_secret
  9. */
  10. public $app_secret = '828a03677a1c00a3a5b3c59209c4433d';
  11. /**
  12. * api版本
  13. */
  14. public $v = "1.0";
  15. /**
  16. * 数据格式
  17. */
  18. public $format = "json";
  19. /**
  20. * 商户ID
  21. */
  22. public $source_id;
  23. /**
  24. * host
  25. */
  26. public $host;
  27. /**
  28. * 构造函数
  29. */
  30. public function __construct($source_id, $online){
  31. if ($online) {
  32. $this->source_id = $source_id;
  33. $this->host = "https://newopen.imdada.cn";
  34. } else {
  35. $this->source_id = "73753";
  36. $this->host = "http://newopen.qa.imdada.cn";
  37. }
  38. }
  39. public function getAppKey(){
  40. return $this->app_key;
  41. }
  42. public function getAppSecret(){
  43. return $this->app_secret;
  44. }
  45. public function getV(){
  46. return $this->v;
  47. }
  48. public function getFormat(){
  49. return $this->format;
  50. }
  51. public function getSourceId(){
  52. return $this->source_id;
  53. }
  54. public function getHost(){
  55. return $this->host;
  56. }
  57. }