PHPackages                             alkurn/yii2-creditcard - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alkurn/yii2-creditcard

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

alkurn/yii2-creditcard
======================

Yii2 credit card widget with client validation

013PHP

Since Oct 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alkurn/yii2-creditcard)[ Packagist](https://packagist.org/packages/alkurn/yii2-creditcard)[ RSS](/packages/alkurn-yii2-creditcard/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-creditcard
===============

[](#yii2-creditcard)

[![Latest Stable Version](https://camo.githubusercontent.com/6ac6d8128a9b936d7cd55f6dea6f8316bfdaf8e3499436a2f4016a0aae6d0212/68747470733a2f2f706f7365722e707567782e6f72672f616c6b75726e2f796969322d637265646974636172642f762f737461626c65)](https://packagist.org/packages/alkurn/yii2-creditcard)[![License](https://camo.githubusercontent.com/827a94e0c352d1c9fea1a7400aff6f9d6739d576bfc383cd10644c05f4fce17c/68747470733a2f2f706f7365722e707567782e6f72672f616c6b75726e2f796969322d637265646974636172642f6c6963656e7365)](https://packagist.org/packages/alkurn/yii2-creditcard)

Yii2 Bootstrap 3 components, providing client validated and masked credit card number, expiry and cvc fields with credit card icon changing to match credit card type when detectable.

Uses client validation courtesy of Stripe () and works with validation in ActiveForm.

For PCI compliance, there is the ability to prevent submit of these fields via the `submit` property by excluding the name attribute from the rendered input element.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/alkurn/yii2-creditcard/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

To install

```
$ php composer.phar require alkurn/yii2-creditcard "@dev"

```

or add

```
"alkurn/yii2-creditcard": "@dev"

```

to the `require` section of your `composer.json` file.

Latest Release
--------------

[](#latest-release)

> NOTE: The latest version of the module is v1.1.0. Refer the [CHANGE LOG](https://github.com/alkurn/yii2-creditcard/blob/master/CHANGE.md) for details.

Usage in view
-------------

[](#usage-in-view)

Note that the input names here have been chosen to fit work with the tuyakhov\\braintree extension

```
