Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test fixed update order status
.gitignore
.travis.yml
LICENSE.txt
README.md
package.json

README.md

Travis CI status for doodlemoonch/pwinty

Pwinty api for Node.js

Pwinty API for Node.js is a library for communicating with the Pwinty API. It uses standard callbacks, you can easily wrap in a promises/generator library of your choosing.

Installation

$ npm install pwinty

Quick Start

Init pwinty with your api credentials and host (sandbox/live):

var pwinty = require('../lib/pwinty')('apiKey', 'merchantId', 'https://sandbox.pwinty.com:443');

Then access the pwinty methods:

Create an order

var orderParams = {};
pwinty.createOrder(orderParams, function (err, order) {

    var photo = {
        type: "4x4",
        url: "photourl",
        copies: "2",
        sizing: "ShrinkToExactFit",
        priceToUser: "450"
    };

    pwinty.addPhotoToOrder(order.id, photo, function (err, order) {
        console.log('photo added');
    });
})
Something went wrong with that request. Please try again.