Catalog npm
Back to packageRELEASE DETAILS

0.0.3-c

npm

2co

Module that will provide nodejs adapters for 2checkout API payment gateway

2checkoutadaptergatewaypayments
Published18 Mar 2012
Direct dependencies0
Transitive dependenciesNot calculated

README

Current package documentation

build status

2CO

2CO is the module that will provide nodejs adapters for 2checkout API payment gateway.

Installation

Installation is done using the Node Package Manager (npm). If you don't have npm installed on your system you can download it from npmjs.org. To install 2co:

$ npm install -g 2co

Usage overview

Example

The list_products call is used to retrieve list of all products in account.

var checkout = require('2co');

/* Filter list results on vendor product ID. Optional. */
var product = {
     vendor_product_id:'your product id'
};

checkout.setAuth('USERNAME','PASSWORD');
/* list_products method */
checkout.exec('list_products',product);

checkout.on('data',function(data){
   console.log(data);
});

checkout.on('error',function(error){
   console.log(error);
});

Instant Notification System

for Express:

var checkout = require('2co'),
express = require('express'),
app = express(),
host = 'localhost',
port = 3000;

// for express < 4 uncomment
// app.use(app.router);  

checkout
     .notificationRoute('/notifications') // default route '/payments/2co/notifications'
     .fetchNotification(function(data,res){
            res.send(data);
     })
     .notificationHelper(app);

app.listen(port,host);

Handling Approved URL

for Express:

/* Callbacks if an order is immediately approved */
checkout
      .scriptRoute('/2co/:pid?')  // default route '/payments/2co/callback/:pid?'
      .scriptCallback(function(pid,data,res){
             res.send(data);
      })
      .scriptHelper(app);

In the Wild

The following projects use 2co.

If you are using 2co in a project, app, or module, get on the list below by getting in touch or submitting a pull request with changes to the README.

Startups & Apps

Recommend extensions

Author

Aleksej Gordejev (aleksej@gordejev.lv). Development was sponsored by Etvnet.

License

(The MIT License)

Copyright (c) 2012 Aleksej Gordejev aleksej@gordejev.lv

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Resources

Bitdeli Badge

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "1051c9e385911e927d06a9b27d6b938f22a3b1d4",
  "tarball": "https://registry.npmjs.org/2co/-/2co-0.0.3c.tgz",
  "integrity": "sha512-2xfu0IYqJgrXYgEiGveqokg7/0rpicKk69B1knicV4Il4z6K9Ep47ca3Qocd58I11cLKBLgs7bNrLKJ4gnQLVA==",
  "signatures": [
    {
      "sig": "MEUCIQCoCYGLc+KYn3ql1SaMGBZxJsa4AIl1NznJG7dtZFIrIgIgIWM3IR2B2EAtYrnK8Gmgl2NiS45McJy7S4mq9wTDeg4=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ]
}

Repository

PENDING
biggora/2co

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:41391c2fd511b74910b08d48d092afc81d67c87bb1d4fe2c813ec71bbb47deaa

Other collected versions

0.0.421 Apr0.0.3-f2 Apr0.0.3-e24 Mar0.0.3-d18 Mar0.0.3-b18 Mar0.0.3-a18 MarView all collected versions →