Markette\Gopay\Service\AbstractPaymentService::getPaymentChannels PHP Method

getPaymentChannels() protected method

protected getPaymentChannels ( string $channel ) : array
$channel string
return array
    protected function getPaymentChannels($channel)
    {
        if (!isset($this->channels[$channel]) && $channel !== Gopay::METHOD_USER_SELECT) {
            throw new InvalidArgumentException("Payment channel '{$channel}' is not supported");
        }
        if ($this->changeChannel === TRUE) {
            $channels = array_keys($this->channels);
        } else {
            $channels = [$channel];
        }
        return $channels;
    }