PHPackages                             vectorface/cc-icons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. vectorface/cc-icons

ActiveLibrary[Image &amp; Media](/categories/media)

vectorface/cc-icons
===================

Generates an image based on a list of supported credit card types

v0.4.1(8mo ago)111.9k↓34.6%MITPHPPHP ^8.1CI passing

Since Nov 2Pushed 8mo ago2 watchersCompare

[ Source](https://github.com/Vectorface/cc-icons)[ Packagist](https://packagist.org/packages/vectorface/cc-icons)[ RSS](/packages/vectorface-cc-icons/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

CC Icons
========

[](#cc-icons)

This is a PHP class that generates an image based on a list of supported credit card or cryptocurrency types. It makes it easy to get an image showing all supported payment types for a payment processor.

Installation
------------

[](#installation)

Run the following [composer](https://getcomposer.org/) command:

```
$ composer require vectorface/cc-icons
```

Using CC Icons
--------------

[](#using-cc-icons)

To create an image, create a new CCImageMaker object and specify which icons to include.

```
use Vectorface\CCIcons\CCImageMaker;

(new CCImageMaker)
    ->withTypes(["Visa", "Mastercard"])
    ->getDataUri();
```

This will return the data URI (RFC 2397) string corresponding to the image that was created. By default, each image is 300x200, transparent, and includes 10px padding between icons.

Methods
-------

[](#methods)

- `withTypes(array $processors)` - Specify which icons to include in the image
- `withPadding(int $new_padding)` - Specify how much padding to include between icons
- `withSize(int $width, int $height)` - Specify the size of the output image
- `withLayout(array $override)` - Override one or more default layouts
- `saveToDisk(string $path)` - Generate and save the image to the given location on disk
- `getDataUri()` - Generate and get the RFC 2397 string corresponding to the image

List of Supported Icons
-----------------------

[](#list-of-supported-icons)

Icons should be specified as a single word, case-insensitive

- Credit Cards:
    - `AMEX`
    - `Dankort`
    - `DinersClub`
    - `Discover`
    - `JCB`
    - `Maestro` -- Aliases: `Switch`, `Solo`
    - `Mastercard` -- Alias: `MC`
    - `PostePay`
    - `UnionPay`
    - `Visa` -- Aliases: `Delta`, `UKE`
- Cryptocurrencies:
    - `BTC` (Bitcoin)
    - `LTC` (Litecoin)
    - `BCH` (Bitcoin Cash)
    - `BNB` (Binance Coin)
    - `ETH` (Ethereum)
    - `USDT` (Tether)
    - `USDC` (USD Coin)

Default Layouts
---------------

[](#default-layouts)

Layouts specify number of icons per row.

```
[
    1 => [1],
    2 => [2],
    3 => [2, 1],
    4 => [2, 2],
    5 => [3, 2],
    6 => [3, 3],
]
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance60

Regular maintenance activity

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~354 days

Recently: every ~439 days

Total

6

Last Release

252d ago

PHP version history (2 changes)v0.1.0PHP &gt;=7.3.0

v0.4.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/df4da5988e7543fce193f4554a6bb30fda64a716fb922cddd36612f82ab7e5a3?d=identicon)[janderson](/maintainers/janderson)

![](https://www.gravatar.com/avatar/7a6bd4b7a52a1ed056c6d597c4124a62da080137edd42cc34355ac2c28e4a154?d=identicon)[francislavoie](/maintainers/francislavoie)

![](https://www.gravatar.com/avatar/e7a685482dc9059b43f003fb6868a9597dd8f858676de95eeff0cabde12ffced?d=identicon)[nicolastuttle](/maintainers/nicolastuttle)

---

Top Contributors

[![nicolastuttle](https://avatars.githubusercontent.com/u/72220827?v=4)](https://github.com/nicolastuttle "nicolastuttle (12 commits)")[![francislavoie](https://avatars.githubusercontent.com/u/2111701?v=4)](https://github.com/francislavoie "francislavoie (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vectorface-cc-icons/health.svg)

```
[![Health](https://phpackages.com/badges/vectorface-cc-icons/health.svg)](https://phpackages.com/packages/vectorface-cc-icons)
```

###  Alternatives

[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k51.2M116](/packages/league-glide)[jenssegers/imagehash

Perceptual image hashing for PHP

2.1k2.2M5](/packages/jenssegers-imagehash)[intervention/image-laravel

Laravel Integration of Intervention Image

1536.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[lasserafn/php-initial-avatar-generator

A package to generate avatars with initials for PHP

4374.2M13](/packages/lasserafn-php-initial-avatar-generator)[rtippin/messenger

Laravel messenger suite.

45035.8k4](/packages/rtippin-messenger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
