init.php 963 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace BsPaySdk;
  3. ini_set('date.timezone', 'Asia/Shanghai');
  4. if (!defined("SDK_BASE")) {
  5. define("SDK_BASE", dirname(__FILE__));
  6. }
  7. # sdk 版本号
  8. if (!defined("SDK_VERSION")) {
  9. define("SDK_VERSION", "php#v2.0.5");
  10. }
  11. # api 接口版本号
  12. if (!defined("API_VERSION")) {
  13. define("API_VERSION", "2.0.0");
  14. }
  15. # 设置是否调试模式
  16. if (!defined("DEBUG")) {
  17. define("DEBUG", false);
  18. }
  19. # 设置调试日志路径
  20. if (!defined("LOG")) {
  21. define("LOG", dirname(SDK_BASE) . "/log");
  22. }
  23. # 设置生产模式
  24. if (!defined("PROD_MODE")) {
  25. define("PROD_MODE", true);
  26. }
  27. # 基础 Core 类
  28. require_once SDK_BASE . "/config/MerConfig.php";
  29. require_once SDK_BASE . "/core/BsPayRequestV2.php";
  30. require_once SDK_BASE . "/core/BsPayTools.php";
  31. require_once SDK_BASE . "/core/BsPay.php";
  32. require_once SDK_BASE . "/core/BsPayClient.php";
  33. require_once SDK_BASE . "/request/BaseRequest.php";
  34. require_once SDK_BASE . "/enums/FunctionCodeEnum.php";