Markette\Gopay\Service\AbstractService::addChannel PHP Method

addChannel() public method

Adds custom payment channel
public addChannel ( string $code, string $name, string $logo = NULL, string $offline = NULL, string $description = NULL, array $params = [] ) : self
$code string
$name string
$logo string
$offline string
$description string
$params array
return self
    public function addChannel($code, $name, $logo = NULL, $offline = NULL, $description = NULL, array $params = [])
    {
        if (isset($this->channels[$code])) {
            throw new InvalidArgumentException("Channel with name '{$code}' is already defined.");
        }
        $this->channels[$code] = (object) array_merge($params, ['code' => $code, 'name' => $name, 'logo' => $logo, 'offline' => $offline, 'description' => $description]);
        return $this;
    }