<?php

declare(strict_types=1);

namespace Kylin\Pay\Service;

use Kylin\Pay\Artful\Contract\ServiceProviderInterface;
use Kylin\Pay\Artful\Exception\ContainerException;
use Kylin\Pay\Pay;
use Kylin\Pay\Provider\Wechat;

class WechatServiceProvider implements ServiceProviderInterface
{
    /**
     * @throws ContainerException
     */
    public function register(mixed $data = null): void
    {
        $service = new Wechat();

        Pay::set(Wechat::class, $service);
        Pay::set('wechat', $service);
    }
}
