GithubHelp home page GithubHelp logo

terrorizer1980 / discord.pay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from repyh/discord.pay

0.0 1.0 0.0 177 KB

Express server setup for easy payment with paypal-rest-sdk for Discord Bots

JavaScript 51.97% CSS 12.36% EJS 35.67%

discord.pay's Introduction

discord.pay

Express server setup for easy payment with paypal-rest-sdk for Discord Bots

What is discord.pay?

discord.pay is an express server that you can clone to integrate with your discord bot to easily add payment. discord.pay are made to be a standalone website apart from your discord bot.

What do I do?

Just a reminder, you obviously need to have a PayPal account.

  1. Make a new application in https://developer.paypal.com/
  2. Clone this repo.
  3. Copy the application id and secret and paste it into .env file to their place.
  4. If you're not hosting this on your local system (which is more likely), you'd need to replace all http://localhost:2000/ in the file with your domain/ip. It should automatically fill it in for you but incase, it doesn't work, do the above. (This also needs to be done in the client-side javascript)
  5. Copy your discord bot token and pate it into the .env file.
  6. Run node index.js
  7. Done! Your server should be running and listen to all the payments made! To go checkout your page, goto your domain/ip.

onSuccess

You can add all the functionality to either modify or do something to the user that successfully made a purchase inside /functions/onSuccess.js file.

Adding Products/Items

You can add and customize your products/items in the items.json file. Its pretty self-explanatory.

Customizing

You can customize your store page by going into the views folder. discord.pay uses ejs for easier use.

Production Mode

Once you're done testing your stuffs, you can go agead and change the mode property in paypal.configure function into live. For reference, you can google paypal developer sandbox and live mode. ` I'm pretty bad at explaining stuffs and I accidentally deleted the previous draft and I only made this as quick as I can. Many features will come soon and this will be updated too.

discord.pay's People

Contributors

repyh avatar

Watchers

 avatar

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.