Download the PHP package vectorface/cc-icons without Composer
On this page you can find all versions of the php package vectorface/cc-icons. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vectorface/cc-icons
More information about vectorface/cc-icons
Files in vectorface/cc-icons
Package cc-icons
Short Description Generates an image based on a list of supported credit card types
License MIT
Informations about the package 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
Run the following composer command:
Using CC Icons
To create an image, create a new CCImageMaker object and specify which icons to include.
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
withTypes(array $processors)
- Specify which icons to include in the imagewithPadding(int $new_padding)
- Specify how much padding to include between iconswithSize(int $width, int $height)
- Specify the size of the output imagewithLayout(array $override)
- Override one or more default layoutssaveToDisk(string $path)
- Generate and save the image to the given location on diskgetDataUri()
- Generate and get the RFC 2397 string corresponding to the image
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
Layouts specify number of icons per row.