Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mhunesi/yii2-cardjs
- Owner: mhunesi
- Created: 2021-11-29T14:04:43.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-29T14:33:54.000Z (about 3 years ago)
- Last Synced: 2024-09-30T22:37:23.039Z (3 months ago)
- Topics: card, credit-card, yii2, yii2-extension, yii2-framework, yii2-widgets
- Language: PHP
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii2 Card JS Widget
================================
Yii2 Card JS WidgetCard 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
]
]) ?>
```