Giter VIP home page Giter VIP logo

angular-payment's People

Contributors

seandesmond avatar st-gwerner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

angular-payment's Issues

modification on cvc formatters and expiry

i dont know how to make a pull request so i create this issue. sorry.

Hello, i found some issues with angular 1.3. + , when loading ngModel from a service, in this line was omittet de return value

.directive('cardCvcValidator', ['payment', function (payment) {
'use strict';
return {
require: 'ngModel',
link: function (scope, elm, attrs, ngModelCtrl) {
function validate(value) {
var valid = value ? payment.validateCardCvc(value) : false;
ngModelCtrl.$setValidity('cardCvc', valid);
return valid;
}

            ngModelCtrl.$parsers.unshift(function (value) {
                return validate(value) ? value : undefined;
            });

            ngModelCtrl.$formatters.unshift(function (value) {
                validate(value);
           //add this line    return value;
            });
        }
    };
}]);

and is an issue on angluar 1.3 + with formatters when the value is an object it need push .. not unshift.

i hope this can help to perform you amazing directive.

does not work on mobile chrome

Hi @seandesmond - it appears this does not work on mobile chrome (I tested with Android) - any ideas why? The month/year field especially does not auto add the slash and furthermore prevents adding one manually so the field can not be filled out at all, effectively breaking the form and preventing payment, so it's a pretty serious bug. I've removed the directive for now on mobile chrome temporarily but it would be awesome to be able to use it again!

Does not work with bower

First, for some reason this doesn't show up in bower search. Second when requiring it after having installed it with bower I get the following error:

Sprockets::FileNotFound - couldn't find file '/Users/brianthecoder/Dropbox/code/20jeans/dstld/vendor/assets/bower_components/angular-payment/tree/gh-pages/payment-tpls-0.1.0-SNAPSHOT.js'

It looks like the file you're requiring is on a different branch, but I can't use that branch because it doesn't have a bower.json, why not just create a dist folder on the master branch and store the files there. It seems to be the common way I've seen with bower.

update to work with Angular 1.3.x

Great directive, loving the no dependencies! However, we just upgraded to the more recent Angular versions and this no longer works. I noticed this hasn't been updated for about a year and currently the gh-pages branch uses angular 1.1.5. Could you update it to work with 1.2.x and 1.3.x?

Thanks!

Why restrict directives?

Hello, it is not an issue but i could not find another way to talk to you.

I was just wondering why do you restrict use of directives to element only?

Model values of CVC and Expiry aren't set

Implemented CC, CVC and Expiry fields.

 <card-number-input name="number" ng-model="data.creditcard.number" card-type="data.creditcard.type" required></card-number-input>
  <card-expiry-input name="expiration" ng-model="data.creditcard.expiration" ></card-expiry-input>
  <card-cvc-input name="cvv2" ng-model="data.creditcard.cvv2"></card-cvc-input>
  data: {{data.creditcard}}

User enters the data and model results in:
{"type":"visa","number":"4111111111111111","expiration":{"month":12,"year":2018},"cvv2":"123"}

User saves the form, but decides later to edit the information. The model hasn't changed and looks exactly as above, however, neither the CVC nor the Expiry field show the model values.

I'd like all fields to show the data entered before.
What am I missing?

Thanks...

Credit card spaces don't auto remove

I've noticed that though the spaces in a credit card number get auto added they don't also get removed automatically.

I was expecting "4111 ", caret at end and I push backspace to get "411". Currently it just removes the space and not the number as I expected.

register with npm?

We've moved away from bower and now use npm exclusively. Its easy enough to specifically call this git repo in our package.json but it would be super great if it was officially registered so versioning was easier.

npm?

Ability to bypass validation for a certain list of credit card numbers.

Certian services like Braspag require a test credit card number "0000 0000 0000 0001" to be used in their sandbox enviroment. I was unable to acomplish this with the current version of the plugin.

It would be great if the plugin supported this usecase.

<input card-number-validator 
           data-whitelist="['0000 0000 0000 0001']" 
           data-ng-model="ccNumber"  />

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.