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(9mo ago)112.6k↓60.3%MITPHPPHP ^8.1CI passing

Since Nov 2Pushed 9mo 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 2d 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

40

—

FairBetter than 86% of packages

Maintenance55

Moderate activity, may be stable

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

298d ago

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

v0.4.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/186284?v=4)[Janderson FFerreira](/maintainers/janderson)[@Janderson](https://github.com/Janderson)

![](https://avatars.githubusercontent.com/u/2111701?v=4)[Francis Lavoie](/maintainers/francislavoie)[@francislavoie](https://github.com/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.6k53.3M146](/packages/league-glide)[intervention/image-laravel

Laravel Integration of Intervention Image

1588.9M183](/packages/intervention-image-laravel)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

506516.3k29](/packages/bkwld-croppa)[laravel-at/laravel-image-sanitize

A small but handy package to prevent malicious code execution coming into your application through uploaded image files.

33866.8k](/packages/laravel-at-laravel-image-sanitize)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)

PHPackages © 2026

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