Download the PHP package clntdev/blade-payment-icons without Composer

On this page you can find all versions of the php package clntdev/blade-payment-icons. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package blade-payment-icons

Blade Payment Icons

A package to easily make use of Payment Icons in your Laravel Blade views.

Installation

The service provider is auto-discovered. To publish the config:

Optionally publish SVGs or views for customization:

Usage

This package provides two ways to use icons:

  1. Blade Icons syntax - standard blade-ui-kit/blade-icons integration for simple icon rendering
  2. Payment Icon component - enhanced component with alias resolution, auto-sizing, and variant support

Blade Icons (Recommended for simple usage)

Icons are available as Blade components, directives, and helpers via the blade-icons ecosystem.

The payicon prefix uses the configured default format (flat). To use a specific format, use the format-specific prefix:

Format Prefix Example
Default (config) payicon <x-payicon-visa />
Flat payflat <x-payflat-visa />
Flat Rounded payflatrounded <x-payflatrounded-visa />
Logo paylogo <x-paylogo-visa />
Logo Border paylogoborder <x-paylogoborder-visa />
Mono paymono <x-paymono-visa />
Mono Outline paymonooutline <x-paymonooutline-visa />

Note: Blade Icons syntax uses SVG filenames directly (e.g., americanexpress, not amex). For alias resolution and variant support, use the Payment Icon component below.

Payment Icon Component

The <x-payment-icon> component provides additional features including alias resolution, automatic aspect ratio sizing, and variant support.

Formats

Six visual formats are available: flat, flatRounded, logo, logoBorder, mono, monoOutline.

Sizing

Width defaults to 40px. Height is auto-calculated to maintain the 780:500 aspect ratio. You can set either dimension - the other adjusts automatically.

Aliases

Card types can be referenced by their aliases. These are case-insensitive and ignore dashes/underscores.

Variants

Some cards have variants. You can reference them directly by alias or use the variant prop.

Attribute Forwarding

Standard HTML/Blade attributes are forwarded to the rendered <svg> element.

The SVG includes role="img" and an aria-label by default for accessibility.

Available Icons

Type Display Name Aliases Variants
Visa Visa - -
Mastercard Mastercard - -
AmericanExpress American Express Amex -
Discover Discover - -
DinersClub Diners Club - -
JCB JCB - -
Maestro Maestro - -
Elo Elo - -
Mir Mir - -
UnionPay UnionPay - -
Hipercard Hipercard - Hiper
Alipay Alipay - -
PayPal PayPal - -
Swish Swish - -
Generic Generic Card (Front) GenericCard, GenericCardFront Code (back/CVV), CodeFront (front CVV)

The Generic card's Code variant has additional aliases: GenericBack, GenericCardBack, CvvBack, CvcBack, Cvv, Cvc. The CodeFront variant has: GenericFrontCode, CvvFront, CvcFront.

Icon Formats

Format Directory Description
flat flat/ Flat design
flatRounded flat-rounded/ Flat with rounded corners
logo logo/ Centered logo only
logoBorder logo-border/ Logo with border
mono mono/ Monochrome
monoOutline mono-outline/ Monochrome outline

Configuration

After publishing the config (config/blade-payment-icons.php), you can customize:

Defaults

Card Definitions

Each card entry in the cards array supports the following fields:

Field Type Description
type string Canonical type name used for file resolution (e.g. Visa, AmericanExpress)
displayName string Human-readable name
aliases string[] Alternative names that resolve to this type
variants array Named sub-types with their own SVG files (see below)
testNumbers string[] Sample card numbers for testing
patterns array Regex patterns for card detection - full (complete numbers) and prefix (partial input)
lengthRange array\|null min/max digit count, or null for non-card payment methods
formatPattern array\|null Digit grouping for display formatting (e.g. [4, 4, 4, 4] or length-keyed like [14 => [4, 6, 4], 16 => [4, 4, 4, 4]])
issuingCountries string[]\|null ISO country codes or GLOBAL

Variants

Variants are defined as a keyed array within a card definition:

The slug maps to an SVG file. For example, Hipercard's Hiper variant resolves to hiper.svg in the chosen format directory.

Pattern Matching

Cards are detected by regex patterns. The prefix pattern matches partial input (useful for real-time detection as users type), while full patterns validate complete card numbers:

Cards with more specific patterns are checked first to avoid false matches (e.g. Elo's specific BIN ranges are checked before Mastercard's broader 5xxx range).

Card Utilities

The package registers CardUtilities and CardMetadata as singletons. Resolve them from the container to detect, validate, format, and mask card numbers.

Credits

SVG icons and card utilities sourced from react-svg-credit-card-payment-icons


All versions of blade-payment-icons with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
blade-ui-kit/blade-icons Version ^1.7
illuminate/support Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clntdev/blade-payment-icons contains the following files

Loading the files please wait ...