Coder Social home page Coder Social logo

tolfix / cpg-api Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 1.28 MB

Central Payment Gateway

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

License: MIT License

TypeScript 99.12% Shell 0.36% JavaScript 0.03% Dockerfile 0.28% Batchfile 0.02% HTML 0.20%
rest-api api payment-gateway invoice customer-account stripe swish nodejs typescript mongodb

cpg-api's Introduction

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 [email protected]

๐Ÿ‘ท | 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/.

cpg-api's People

Contributors

qtkaii avatar slitzo3 avatar tolfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cpg-api's Issues

Plugins

Make it possible to add plugins.

Either by adding it manually here in src, or by adding it via NPM.

Simplify with CRUD

Will make it simplier by doing CRUD by using controllers and remove caching and always be in touch with our database.

Implement paypal

Add paypal
Using paypal-sdk to add the system.

Thinking about creating a unique URL when a order is created if payment_method is paypal, and when the user goes to the URL it will redirect to paypals payment, and once paid to a success page saying it went well etc.

[Feature] Event listener.

Add event listeners to various events.

One example could be an invoice has been paid, then emit the event. Then someone listing (like plugins) can take it and trigger something, for perhaps handle the product etc.

[Feature] Translation

Currently the code is kinda hard coded to Swedish and English on some parts, need to fix a translation for more dynamic.

[Feature] Better plugin handler

The current plugin handler could be improved, perhaps could add the direct path of the build, to access files easier that has been exported?

14 -> 30 days

Orders/Invoices creates/reminds every 14 days, perhaps should make it dynamic and make admin's choice or make it default at 30 days.

[Feature] Style emails

Right now the emails are looking a bit bad. Could use more styles with css to make them look better.

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.