PaySwarm is the world's first implementation of a set of technologies that make payments a core part of the Web.
This repository contains a reference implementation of a Web Payments Processor based on the specifications at: https://web-payments.org/specs/
P3 is a Web application and REST API service that can be used to deploy Web Payments As a Service (WPaaS) for banks, financial insitutions, and individuals that want to manage their own financial accounts.
A demo of what P3 can do can be found here:
You can follow the following tutorial to setup and use p3 on a Linux or Mac OS X development machine.
- Linux or Mac OS X
- node.js >= 0.10.x
- npm >= 1.4.x
- mongodb ~= 2.4.x
- Setup an admin user on mongodb (see below)
- Map the
payswarm.dev
hostname to your machine (see below). - cd <YOUR_SOURCE_DIRECTORY>
- git clone git@github.com:digitalbazaar/bedrock.git
- cd bedrock && npm install && cd ..
- git clone git@github.com:digitalbazaar/p3.git
- cd p3 && mkdir node_modules
- ln -s ../../bedrock node_modules/
- npm install
- [optional] Tweak config settings in configs/payswarm.dev.js
To setup an admin user on mongodb:
- mongo
- use admin
- db.addUser( { user: "admin", pwd: "password", roles: [ "clusterAdmin", "readWriteAnyDatabase", "userAdminAnyDatabase", "dbAdminAnyDatabase"] } )
To setup the payswarm.dev
hostname:
- Edit the /etc/hosts file as the administrator/root.
- Add an entry mapping the IP address to
payswarm.dev
. For example:192.168.0.15 payswarm.dev
(where192.168.0.15
is the IP address of your primary network device.
Run the following to start up a development server from the source directory:
node payswarm.dev.js
To add more verbose debugging, use the --log-level
option:
node payswarm.dev.js --log-level debug
To access the server:
- Go to: https://payswarm.dev:22443/
- The certificate warning is normal for development mode. Accept it and continue to the landing page.
- Login as the admin
admin
with the passwordpassword
or create a new account.
Install protractor (before first test run):
npm run install-protractor
Run all backend and frontend tests:
npm run test
Run just the backend tests:
npm run test-backend
Run just the frontend tests:
npm run test-frontend
Run a specific frontend test suite:
nodejs test.js --frontend --suite unit
npm run coverage
Look at 'coverage.html' using a web browser
npm run minify
To test in dev mode, set the website config var 'minify' to true.
nodejs create-credentials.js
Save the generated private key and certificate PEMs in the appropriate files (in ./pki/ if using the default config).
For a complete list of features included in p3, see the FEATURES file.
See the FAQ file for answers to frequently asked questions.
See the HACKING file for various details for coders about hacking on this project.
See the AUTHORS file for author contact information.
P3 and all p3 modules are:
Copyright (c) 2010-2015 Digital Bazaar, Inc.
All Rights Reserved
You can use P3 for non-commercial purposes such as self-study, research, personal projects, or for evaluation purposes. See the LICENSE file for details about the included non-commercial license information.