diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..abaa559 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory" : "tests/lib" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index eb79dd5..c727bb7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules .idea +.DS_Store diff --git a/README.md b/README.md index f2df98e..e392d8b 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,22 @@ And then: Basically the directive sends the credit card details directly to stripe, which then returns a token that you can use to charge the card, subscribe a user or to do other things. This ensures that the card details themselves never hit your backend and thus you have to worry a little bit less. +## recurlyForm + +This directive intercepts the form submission and calls out to `recurly.js` using the `v3` API. It works similarly to the `stripeForm` directive and makes the request to recurly to get the one-time use token: + +
+ +Instead of making the request to recurly, this directive will fetch the appropriate data from the form and make the request to recurly to get the token. Once this token has been retrieved from recurly, it will call the `CALLBACK` function passed in through the directive. + +This directive uses credit card processing by default, BUT it also includes an option for using paypal. To use paypal instead of credit cards, simply add the `paypal` attribute to the `recurlyForm`: + + + ## Example See example-folder. You can run the example with diff --git a/bower.json b/bower.json index 4c824c8..a8e85de 100644 --- a/bower.json +++ b/bower.json @@ -5,6 +5,7 @@ "authors": [ "Lauri Hynynen <@laurihy>" ], + "main": "lib/angular-payments.js", "description": "Directive for formatting and validating credit card forms", "keywords": [ "stripe", @@ -22,5 +23,9 @@ "bower_components", "test", "tests" - ] + ], + "dependencies": { + "angular": "~1.2.16", + "angular-mocks": "~1.2.16" + } } diff --git a/example/index.html b/example/index.html index 0cca048..770dadb 100644 --- a/example/index.html +++ b/example/index.html @@ -10,17 +10,23 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + +