Giter Club home page Giter Club logo

paysoncheckout2's Introduction

paysoncheckout2

A minimal repo which talks to the payson checkout 2.0 api (node)

This is a really quick and dirty module just to implement the very fundamentals for interacting with the payson api.

Someday I might try to wright a proper readme file but please, don't hold your breath while you wait ;). Instead, have a look in the examples folder to see some quick examples of how to use the module.

Install

NPM

npm install paysoncheckout2

In your app

var PaysonPayment = require('paysoncheckout2');

// create instance (third param sets module to production mode and all the requests will go the production api)
var inProduction = false;
var payson = PaysonPayment.Payson(<vendorId>, <apiKey>, inProduction);

// create item
var item = new PaysonPayment.OrderItem('Test item', 'someIdentifier', 49);

// make it two
item.setQuantity(2);

// create a checkout (you make one per purchase)
var checkout = new PaysonPayment.Checkout('someId', 'https://www.example.com');

// add item to checkout
checkout.addItem(item);

// register the payment
payson.create(checkout)
	.then(function(body) {
		// write body.id to your database
	});

notificationUri

Remeber that you must provide a notificationUri to your app where payson can inform you about updates of the order. I suggest you study their documentation.

Documentation

Before diving into this module please read the Payson documentation.

paysoncheckout2's People

Contributors

organismen avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

staffe

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.