<commit_before># node-fastpay

[![NPM version](https://badge.fury.io/js/fastpay.svg)](http://badge.fury.io/js/fastpay)
[![Build Status](https://travis-ci.org/okuryu/node-fastpay.svg?branch=master)](https://travis-ci.org/okuryu/node-fastpay)
[![Dependency Status](https://gemnasium.com/okuryu/node-fastpay.svg)](https://gemnasium.com/okuryu/node-fastpay)
[![Coverage Status](https://coveralls.io/repos/okuryu/node-fastpay/badge.png?branch=master)](https://img.shields.io/coveralls/okuryu/node-fastpay.svg)

FastPay for Node.js.

## Getting started

Install to using NPM.

```
$ npm install fastpay
```

All functions of `fastpay` object passes the data via callbacks.
Callbacks has the error and response data via the [request](https://github.com/mikeal/request) module.

```js
var fastpay = require("fastpay");

fastpay("YOUR_API_KEY", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Create a charge

```js
fastpay("YOUR_API_KEY").create({
    amount: 1000,
    card: "YOUR_CARD_ID"
}, function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Retrieve a charge

```js
fastpay("YOUR_API_KEY").retrieve("YOUR_CHARGE_ID", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Refund a charge

```js
fastpay("YOUR_API_KEY").refund("YOUR_CHARGE_ID", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Capture a charge

```js
fastpay("YOUR_API_KEY").capture("YOUR_CHARGE_ID", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Retrieve all charge

```js
fastpay("YOUR_API_KEY").all({
    count: 1
}, function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## More details to use FastPay

All the stuff in [FastPay official documents](https://fastpay.yahoo.co.jp/docs).

## Testing

`npm test` runs liting and testing scripts.

```
$ npm install
$ npm test
```

Finally the code coverage report will be generated.

## Contributing

See the [CONTRIBUTING.md](CONTRIBUTING.md).

## Author

| ![](https://s.gravatar.com/avatar/533a232628640bc2635e6d6e0fcb2528?s=80) |
| --- |
| [<NAME>](http://www.okuryu.com/) |

## License

This module is available under the [BSD license](LICENSE).

The [request](https://github.com/mikeal/request) module is available under the Apache License 2.0.
<commit_msg>Fix Coveralls badge<commit_after># node-fastpay

[![NPM version](https://badge.fury.io/js/fastpay.svg)](http://badge.fury.io/js/fastpay)
[![Build Status](https://travis-ci.org/okuryu/node-fastpay.svg?branch=master)](https://travis-ci.org/okuryu/node-fastpay)
[![Dependency Status](https://gemnasium.com/okuryu/node-fastpay.svg)](https://gemnasium.com/okuryu/node-fastpay)
[![Coverage Status](https://img.shields.io/coveralls/okuryu/node-fastpay/master.svg)](https://coveralls.io/r/okuryu/node-fastpay?branch=master)

FastPay for Node.js.

## Getting started

Install to using NPM.

```
$ npm install fastpay
```

All functions of `fastpay` object passes the data via callbacks.
Callbacks has the error and response data via the [request](https://github.com/mikeal/request) module.

```js
var fastpay = require("fastpay");

fastpay("YOUR_API_KEY", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Create a charge

```js
fastpay("YOUR_API_KEY").create({
    amount: 1000,
    card: "YOUR_CARD_ID"
}, function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Retrieve a charge

```js
fastpay("YOUR_API_KEY").retrieve("YOUR_CHARGE_ID", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Refund a charge

```js
fastpay("YOUR_API_KEY").refund("YOUR_CHARGE_ID", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Capture a charge

```js
fastpay("YOUR_API_KEY").capture("YOUR_CHARGE_ID", function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## Retrieve all charge

```js
fastpay("YOUR_API_KEY").all({
    count: 1
}, function (err, res, body) {
    if (!err && res.statusCode === 200) {
        console.log(body);
    }
});
```

## More details to use FastPay

All the stuff in [FastPay official documents](https://fastpay.yahoo.co.jp/docs).

## Testing

`npm test` runs liting and testing scripts.

```
$ npm install
$ npm test
```

Finally the code coverage report will be generated.

## Contributing

See the [CONTRIBUTING.md](CONTRIBUTING.md).

## Author

| ![](https://s.gravatar.com/avatar/533a232628640bc2635e6d6e0fcb2528?s=80) |
| --- |
| [<NAME>](http://www.okuryu.com/) |

## License

This module is available under the [BSD license](LICENSE).

The [request](https://github.com/mikeal/request) module is available under the Apache License 2.0.

{'fraction_non_alphanumeric': 0.18599647956190105, 'fraction_numerical': 0.019557989438685704, 'mean_word_length': 3.8984674329501914, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 22, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1902381', 'n_tokens_mistral': 1999, 'n_tokens_neox': 1842, 'n_words': 384}