DouyinServiceProvider.php 533 B

123456789101112131415161718192021222324
  1. <?php
  2. declare(strict_types=1);
  3. namespace Yansongda\Pay\Service;
  4. use Yansongda\Artful\Contract\ServiceProviderInterface;
  5. use Yansongda\Artful\Exception\ContainerException;
  6. use Yansongda\Pay\Pay;
  7. use Yansongda\Pay\Provider\Douyin;
  8. class DouyinServiceProvider implements ServiceProviderInterface
  9. {
  10. /**
  11. * @throws ContainerException
  12. */
  13. public function register(mixed $data = null): void
  14. {
  15. $service = new Douyin();
  16. Pay::set(Douyin::class, $service);
  17. Pay::set('douyin', $service);
  18. }
  19. }