Skip to content

Commit

Permalink
Initial port of Recurly.js v3
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
  • Loading branch information
chrissrogers committed Mar 29, 2014
0 parents commit f79c0a9
Show file tree
Hide file tree
Showing 54 changed files with 9,484 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
.sauce

node_modules
npm-debug.log

build
components

test/server/pid.txt

/recurly.js
/recurly.min.js
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js
script: make test-sauce
node_js:
- '0.10'
env:
global:
- secure: 'Q2BpyJZM/sgK5I9FRc2RqJ6LTQ3MR8Rk0Bs4BgzYE+QlsOS0mbwI5kjVwVCERu8+5MipD9pDXxeror3gnexQjtlD2DC2yhEvsjE1Q9nUc1fJO8yjH0LdRhcRj3i6cNciydTkvS/QJgi8mXO3Nfb+MDIhiBPyZbCfyj+yjcFgu2c='
- secure: 'KFrQZYFBREY1xKAnnDJFUJaOwTn0sb4oHkFjhlSYzsTpDcWQEowPK72i8IOknf3r55qAuxi5VDKHcV/AcEGSSnG8Olopm3RZQ4mugPz/93lXg9lm73pT0tfK4jGPlQV7rYT4kkexy5F3LAW8ojSOTctGImIzgmm2Qm3RQJBBl5E='
matrix:
- BROWSERS: 'chrome, safari, firefox, ie8..11'
notifications:
campfire:
rooms:
secure: VG1YCnwpSWtd/2wl+d0kyADt6zLWeXVFHXUVo7X0DndK/kRHIea3SAB5vBMAXWS84LvLaVKW7e9NFLsEjeJm1iIu8VzH6B4ersXm4Gr+ba+KLMNKXrWcqp0/1aluWy0ooIxa6zMICYpOZdOyOMhvxys8nESSNwDYdKnRsrjb7bw=

25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BIN= node_modules/.bin
COMPONENT= $(BIN)/component
MINIFY= $(BIN)/uglifyjs
DELEGATE= test test-browser test-sauce

recurly.js: node_modules components $(SRC)
@$(COMPONENT) build --standalone recurly --name recurly --out .
@$(MINIFY) recurly.js --output recurly.min.js

components: component.json
@$(COMPONENT) install

node_modules: package.json
@npm install --silent

$(DELEGATE): recurly.js
@cd test && make $@

clean:
@rm -rf components node_modules recurly.js recurly.min.js
@cd test && make $@

.PHONY: recurly.js
.PHONY: clean test test-browser
.PHONY: test-sauce test-coverage
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Recurly.js 3

Zen subscription billing in the browser

## Overview
This JavaScript library is included in a merchants form page and simplifies integration with
Recurly. When a user submits their credit card information, it is sent to the api.recurly.com and
a Recurly token is returned. This token is then sent to the merchant site, making it simple for
the merchant to be PCI compliant.

If a purchase is being made on the page, the payment is reserved on the credit credit card when
the token is generated. If there is a problem processing the payment, the error can be displayed
on the form page simplifying the user experience and error management required on the merchant
server.

3D Secure is transparently managed to the form developer by the RecurlyJS library and
api.recurly.com.

## API Documentation

[Recurly.js API Docs](https://docs.recurly.com/api/recurlyjs/v3beta)

## Installation

### Standard
```html
<script src="https://js.recurly.com/v3/recurly.js"></script>
```

### Component
**component.json**
```json
{
"dependencies": {
"recurly/recurly-js-v3": "*"
}
}
```
**index.html**
```html
<script>
var recurly = require('recurly');
</script>
```
[Learn more about component](http://github.com/component/component)

## Build
```bash
$ make
```

## Test
```bash
$ make test
```
7 changes: 7 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "recurly",
"version": "3.0.0-beta",
"main": "recurly.js",
"dependencies": {},
"devDependencies": {}
}
47 changes: 47 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "recurly",
"repo": "recurly/recurly-js",
"description": "Official Recurly JavaScript client for the browser.",
"version": "3.0.0-beta",
"keywords": [
"recurly"
],
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"chrissrogers/querystring": "*",
"chrissrogers/noop": "*",
"component/emitter": "*",
"component/indexof": "*",
"component/bind": "*",
"component/find": "*",
"component/each": "*",
"component/map": "*",
"yields/merge": "*",
"learnboost/jsonp": "*",
"visionmedia/debug": "*",
"component/type": "*",
"component/json": "*",
"kewah/mixin": "*",
"component/event": "*",
"danmilon/object.keys-shim": "*"
},
"scripts": [
"lib/index.js",
"lib/recurly.js",
"lib/version.js",
"lib/errors.js",
"lib/util/dom.js",
"lib/util/parse-card.js",
"lib/mixins/coupon.js",
"lib/mixins/paypal.js",
"lib/mixins/plan.js",
"lib/mixins/tax.js",
"lib/mixins/token.js",
"lib/mixins/validate.js",
"lib/mixins/pricing/index.js",
"lib/mixins/pricing/calculations.js",
"lib/mixins/pricing/binding.js"
],
"remotes": []
}
Loading

0 comments on commit f79c0a9

Please sign in to comment.