PayDispatchService.php 586 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Service;
  3. use App\Modes\ErrorLog;
  4. use App\Modes\Order;
  5. use Yansongda\Pay\Pay;
  6. use Yansongda\Pay\Log;
  7. class PayDispatchService
  8. {
  9. protected $config = [];
  10. protected $pay;
  11. public function __construct()
  12. {
  13. }
  14. public static function dispatch($type)
  15. {
  16. switch ($type) {
  17. case 2:
  18. $pay = \App::make('aliPay');
  19. break;
  20. case 3:
  21. $pay = \App::make('wechat');
  22. break;
  23. default;
  24. $pay = false;
  25. }
  26. return $pay;
  27. }
  28. }