LSPSetting.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace app\common\payment\setting\other;
  3. use app\common\payment\setting\BasePaymentSetting;
  4. class LSPSetting extends BasePaymentSetting
  5. {
  6. public function canUse()
  7. {
  8. // 没有加速池插件 或 基础设置没有开启通证支付 或 基础设置开启了通证抵扣
  9. if (!app('plugins')->isEnabled('love-speed-pool') || \Setting::get('plugin.love_speed_pool.pay') != 1 || \Setting::get('plugin.love_speed_pool.is_tz_deduction') == 1) {
  10. return false;
  11. }
  12. $ljzInfo = \Setting::get('plugin.love_speed_pool_ljz');
  13. // 商户注册: 没有注册 或 没有设置余额通证
  14. // if (!$ljzInfo['ljz_uid'] || !$ljzInfo['blance_currency']) {
  15. if (!$ljzInfo['blance_currency']) {
  16. return false;
  17. }
  18. return true;
  19. }
  20. public function needPassword()
  21. {
  22. return false;
  23. }
  24. public function getWeight()
  25. {
  26. return 1002;
  27. }
  28. public function getName()
  29. {
  30. $name = "通证支付";
  31. $setting = \Setting::get('plugin.love_speed_pool');
  32. if ($setting['diy_pay_name']) {
  33. $name = $setting['diy_pay_name'];
  34. }
  35. return $name;
  36. }
  37. }