Skip to content

dannytech/plasticjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlasticJS

Build Status

PlasticJS is an Express-compatible all-in-one payment library for NodeJS web applications. It supports integration with many existing payment services, including Stripe, PayPal, BrainTree, and more to come

Install

$ npm install plasticjs

Usage

Configuring Providers

By default, PlasticJS does not come with any payment providers in its package. It is designed to allow other modules, providers, plug into it so you can customize how your users support you. To add a provider is simple: npm install it, then require it into Plastic:

var stripe = require("plasticjs-stripe").Provider;
plastic.use("stripe", stripe({
    
}));

Express middleware

PlasticJS provides easy integration into Express using middleware:

When you want to add a payment page:

// Opens the payment page for the provider
app.get("/stripe", plastic.pay("stripe"));

// Pays after form submission
app.post("/stripe", plastic.pay("stripe"));

Providers

Provider
Stripe
Paypal
BrainTree

Releases

No releases published

Packages

No packages published