angular.jquery.payment
v1.0.3
Published
Angularjs directives to jquery.payment
Downloads
8
Readme
Angular Jquery Payment
Angularjs directives to jquery.payment
Installation
$ bower install angular.jquery.payment --save
Usage
Include the plugin in your application:
<script src="../bower_components/jquery/dist/jquery.min.js"></script>`
<script src="../bower_components/jquery.payment/lib/jquery.payment.min.js"></script>`
<script src="../dist/angular.jquery.payment.js"></script>`
And then include the AngularJs module:
app = angular.module('app', ['angular.jquery.payment'])
Controller example
app.controller('cardForm', ['$scope', function($scope) {
$scope.expiry = {exp: ''};
$scope.card_type = '';
$scope.card = {number: '', exp_month: '', exp_year: '', cvc: ''};
}
]);
The directives build the credit card inputs with validation and formatting.
<input-card-number ng-model='card.number' card-type='card_type' placeholder='Number'>
<input-card-expiry ng-model='expiry.exp' month='card.exp_month' year='card.exp_year' placeholder='Expiry'>
<input-card-cvc ng-model='card.cvc' card-type='card_type' placeholder='CVC'>