/** * Get icons for available payment methods * * @return array */ protected function getIcons() { $icons = []; $types = $this->ccConfig->getCcAvailableTypes(); foreach (array_keys($types) as $code) { if (!array_key_exists($code, $icons)) { $asset = $this->ccConfig->createAsset('Magento_Payment::images/cc/' . strtolower($code) . '.png'); $placeholder = $this->assetSource->findRelativeSourceFilePath($asset); if ($placeholder) { list($width, $height) = getimagesize($asset->getSourceFile()); $icons[$code] = ['url' => $asset->getUrl(), 'width' => $width, 'height' => $height]; } } } return $icons; }