Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mhunesi/yii2-cardjs

Yii2 Card JS Widget
https://github.com/mhunesi/yii2-cardjs

card credit-card yii2 yii2-extension yii2-framework yii2-widgets

Last synced: about 2 months ago
JSON representation

Yii2 Card JS Widget

Awesome Lists containing this project

README

        

Yii2 Card JS Widget
================================
Yii2 Card JS Widget

Card JS https://github.com/jessepollak/card

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

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require --prefer-dist mhunesi/yii2-cardjs "*"
```

or add

```
"mhunesi/yii2-cardjs": "*"
```

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

Usage
-----

Once the extension is installed, simply use it in your code by :

```php










= \mhunesi\cardjs\CardJs::widget([
'clientOptions' => [
'form' => '.card-form',
'placeholders' => [
'number' => '**** **** **** ****',
'name' => 'Name Lastname',
'expiry' => '**/**',
'cvc' => '***'
],
'formSelectors' => [
'numberInput' => 'input[name="number"]',
'expiryInput' => 'input[name="expiry"]',
'cvcInput' => 'input[name="cvc"]',
'nameInput' => 'input[name="name"]'
],
'formatting' => true,
'debug' => YII_ENV_DEV
]
]) ?>


```