laurihy / angular-payments

Module that provides AngularJS-directives for formatting, validating and working with payments
560 stars 269 forks source link

removed stripe.js dep #24

Open boxxxie opened 10 years ago

boxxxie commented 10 years ago

can we just $http? from what I understand your code that deals with stripe is only making 1 http call. stripe has a documented HTTP API.

would you accept a PR that replaces the $window.Stripe with $http?

i'm interested in this for testing purposes using $httpbackend.

intellix commented 10 years ago

Actually, I'm in need of payment validators (credit card, cvc, expiry etc) and seeing that this requires stripe.js and adds a directive for that. I have no idea what stripe is and will never use it and wonder if perhaps this project can be split into two. I'm sure there are many people who just want card validation etc. All I'm seeing regarding StripeJS is the one form directive.

intellix commented 10 years ago

On that note, I've added a validator library that takes the card/cvc validators from here. https://github.com/intellix/angular-validators. I suppose still to do is take the formatters (spacing between each 4-digits etc)... but it's properly jshinted, tested and isn't littered to hell with globals