Skip to content

Node api in express integrating payment gateways and Jwt auth

Notifications You must be signed in to change notification settings

devgrunge/paymentGateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payment Gateway

This is a Payment Gateway application built with Node.js, Express, and TypeScript. It includes features such as PayPal payment integration and MongoDB for data storage.

Table of Contents

Features

  • PayPal payment integration
  • MongoDB connection
  • User model and basic routes
  • Paypal Integration
  • Ifthenpay Integration (Portuguese payment gategway)

Prerequisites

Make sure you have the following installed:

Installation

Follow these steps to clone the repository, install dependencies, and run the application.

1. Clone the repository

git clone https://github.com/your-username/paymentGateway.git
cd paymentGateway

2. Install dependencies

npm install

Running the application

npm run dev

Environment Variables

Create a .env file in the root directory of the project and add the following variables:

PAYPAL_CLIENT_ID=your_paypal_client_id
PAYPAL_CLIENT_SECRET=your_paypal_client_secret
MONGO_URI=your_mongo_db_connection_string
PORT=8000

Endpoints

Payment Routes

  • POST /payment/paypal - Create a PayPal payment
  • POST /payment/paypal/execute - Execute a PayPal payment
  • GET /payment/paypal/plans - List all PayPal subscription plans
  • POST /payment/paypal/plans - Create a PayPal subscription plan
  • POST /payment/paypal/subscriptions - Create a PayPal subscription
  • GET /payment/paypal/subscriptions - List all active PayPal subscriptions

License

This project is licensed under the MIT License. See the LICENSE file for details.

This README provides instructions for cloning, installing, and running the application, along with setting up environment variables and information about available endpoints.

About

Node api in express integrating payment gateways and Jwt auth

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published