Coder Social home page Coder Social logo

maxwell2022 / armor-payments-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darthtrevino/armor-payments-nodejs

0.0 1.0 0.0 69 KB

Node.js package for interacting with the Armor Payments API http://www.armorpayments.com/api

License: MIT License

CoffeeScript 100.00%

armor-payments-nodejs's Introduction

Armor Payments Node.js Client

This is intended to be a clean, idiomatic client for the Armor Payments API. This will handle generating the authenticated headers and constructing the properly nested request URI, as well as parsing any response JSON for you.

Circle CI npm version

Installation

To install use npm and add the package to your application's dependencies:

$ npm install armor-payments --save

Usage

The Armor Payments API is REST-ish and nested, so the client relies on chaining. We use request-promise to return a Promise for all operations resulting in an API request, with the added nice-ness that we've parsed the JSON response body for you if possible.

var armorPayments = require('armor-payments');

var client = new armorPayments.API('your-key', 'your-secret', shouldUseSandbox);

// There are four top-level resources: accounts, users, orders, and shipmentcarriers
// Querying users and orders requires an accountId
client.accounts().all().then(function (response) {
    // response.body contains parsed JSON object
});

Fore more detailed usage examples, See the Ruby client. We follow the same API naming and method chaining conventions with only differences being the usage of camelCase instead of under_scores, and using Promises for handling responses as above.

Developing

We use CoffeeScript for development. The source files are under src and the tests are under test. To compile CoffeeScript into JavaScript and run tests, invoke Grunt:

$ grunt

Features branching and release management are handled using git-flow, and active development is always done on the develop branch.

Releasing a Version

Making a release involves the following steps:

  1. Update CHANGELOG.md with relevant changes

  2. Create new release branch, for example:

     $ git flow release start v0.2.0
    
  3. Bump version:

     $ npm version --no-git-tag-version [major|minor|patch|...]
    
  4. Commit and finalize release, and push to remote:

     $ git commit -a -m "bumped version for release"
     $ git flow release finish v0.2.0
     $ git push --all
     $ git push --tags
    
  5. Push to NPM:

     $ npm publish
    

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Find this project useful? Help us make it even better by submitting any bugs or improvement suggestions you have as GitHub Issues and Pull Requests.

Like what we're doing? There's much more Node.js and CoffeeScript goodness where this came from! drop us a line if you wanna chat about potential career opportunities at Globality: careers at globality dot com

License

MIT License. See accompanying LICENSE.txt file.

armor-payments-nodejs's People

Contributors

adamhadani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.