WebPay node.js bindings https://webpay.jp
var webpay = require('webpay');
webpay.apiKey = 'YOUR_TEST_SECRET_KEY';
webpay.client.charge.create({
amount: 330,
currency: "jpy",
card: {
number: "4242-4242-4242-4242",
exp_month: "11",
exp_year: "2014",
cvc: "123",
name: "KEI KUBO"
},
description: "Buy an item"
}, function(err, res) {
console.log(res);
});
$ npm install webpay
Set your api key to webpay
object from webpay
module.
var webpay = require('webpay');
webpay.apiKey = 'YOUR_TEST_SECRET_KEY';
Call an interested method.
webpay.client.charge.create({
amount: 330,
currency: "jpy",
card: {
number: "4242-4242-4242-4242",
exp_month: "11",
exp_year: "2014",
cvc: "123",
name: "KEI KUBO"
},
description: "Buy an item"
}, function(err, res) {
console.log(res);
});
- node.js API document in WebPay official site node.js APIドキュメント
To run the test suite, first invoke the following command within the repo, installing the development dependencies:
$ npm install
Then run the tests and jshint:
$ make
Webpay-node was originally created by @maginemu, and extended by WebPay team. We thank @maginemu for starting such a great work and willingly giving us the ownership.
Former owner of "webpay" on npm repository is @e-jigsaw. He transfered this name-space to us. We also thank @e-jigsaw.
Copyright (c) 2013- maginemu, WebPay.