Tolfix / cpg-api

Central Payment Gateway

Home Page:http://demo.cpg.tolfix.com/graphql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IMPORTANT NOTE

CPG is now in one repo, go to https://github.com/Tolfix/cpg

Typescript Typings Docker Image CodeQL Build Version

โญ | CPG-API

CPG-API is being used to generate items, create invoices, handle orders, view transactions, and ensure payments make it to the client to develop your business. It offers many approaches for developers to personalize CPG

๐Ÿ“| Table of content

๐Ÿ“‹ | Documentation

You can read our documentation on our wiki.

๐Ÿ“ฆ | Setup

Setting up CPG can be done in various ways, but by far the simplest is by using Docker.

You can pull the latest Docker Image from tolfixorg/cpg:latest from DockerHub.

CPG also needs environment variables added, which you can find in .env.example, those that have (optional) in the comment can be ignored if you don't feel the need for them, but the others are required to make CPG functional.

๐Ÿ”ง | Installing

CPG requires the following

  • Node.js v14 or v16
  • Typescript - 4.3.5
  • MongoDB
  • Git
  1. Clone repository
git clone https://github.com/Tolfix/CPG-API
  1. Install dependencies
npm install
  1. Install TypeScript
npm install -g typescript@4.3.5

๐Ÿ‘ท | Building

CPG is built from TypeScript, so you can run it by using the compiler.

tsc -b
npm run build

๐Ÿ‘Ÿ | Running

You can run CPG by executing npm run start or node ./build/Main.js. I Would recommend you use pm2.

๐ŸŽจ | Plugins

Plugins allow you to add others features to CPG. Beware, it can be dangerous as plugins get access to a lot of low level features. You can trust Tolfix plugins, or plugins you created yourself, otherwise there is no guarantee on stability or security. If you want to create your own plugin, check out cpg-plugin-template to create you're own!

Installing

You can add new plugins by modifying the environment variable "PLUGIN" as an array of strings. PLUGINS=["cpg-plugin-discord-webhook", "cpg-plugin-"] This will install the plugin via npm.

Deleting

To delete a plugin, simply remove it from the environment variable "PLUGIN" as an array of strings. PLUGINS=[] This will uninstall the plugin via npm.

๐Ÿ“ข | Contribute

Want to contribute? Great! You can contribute to the repository by forking, then make a pull request when you're done!

Or you can ask on our discord server.

๐Ÿ”ฎ | Discord

Discord

โš™ | Tolfix

Tolfix is a company focused on IT, Development and Networking, we strive to help others with their IT issues and love contributing to other peoples projects! If you'd like to find out more, you can visit us at https://tolfix.com/.

About

Central Payment Gateway

http://demo.cpg.tolfix.com/graphql

License:MIT License


Languages

Language:TypeScript 99.1%Language:Shell 0.4%Language:Dockerfile 0.3%Language:HTML 0.2%Language:JavaScript 0.0%Language:Batchfile 0.0%