0.2.0 • Published 9 years ago

paymill v0.2.0

Weekly downloads
12
License
-
Repository
github
Last release
9 years ago

paymill-nodejs

Node.js wrapper for Paymill API/V2.x.

This module as been created as a drop in replacement for komola's paymill-node which does not support the latest features in the Paymill API/V2.1

Installation

npm install paymill

Usage

The first thing to do, is create a paymill instance using your Paymill private key and an optional apiVersion (which can be either v2 or v2.1, with the last one being the default, if the argument is omitted).

var paymill = require('paymill')('apiKey'[, 'apiVersion']);

We can now access the API using a generic pattern, and all methods takes a callback as the last argument.

paymill.{resourceName}.{method}(..., function (err, ...) {
	// ...
});

API endpoints

Plain JavaScript object, e.g. { key: 'value' } is expected as data and as the argument in all create-method

TODO

  • Add unit and integration tests
  • Add examples to show how to use the wrapper in various cases

Author

Written by Daniel Juhl. Inspiration from Ask Bjørn Hansen and komola's paymill-node.