Razorpay Payment Gateway Integration

This repository demonstrates the integration of Razorpay payment gateway into a web application. Razorpay is a popular payment gateway provider that allows businesses to accept online payments.

DEMO

payment-gateway-integration2.mp4

Prerequisites

Before getting started, make sure you have the following prerequisites:

  • Node.js (and npm) installed on your development machine
  • Razorpay account credentials (API key and API secret) obtained from Razorpay's dashboard
  • Basic knowledge of React

Installation

  1. Clone this repository to your local machine:
git clone <repository-url>
  1. Navigate to the project directory:
cd razorpay-payment-gateway
  1. Install the dependencies:
npm install

Configuration

  1. Replace <YOUR_API_KEY> and <YOUR_API_SECRET> with your actual Razorpay API key and API secret.
module.exports = {
  apiKey: '<YOUR_API_KEY>',
  apiSecret: '<YOUR_API_SECRET>'
};

Usage

  1. Start the development server:
npm start
  1. Open your web browser and visit http://localhost:3000 to view the web application.

  2. Click on the "Pay Now" button to initiate the payment process.

  3. Complete the payment using the provided Razorpay test credentials or your own test credentials.

  4. After a successful payment, you will receive a confirmation message.

Deployment

To deploy the web application to a production environment, follow these steps:

  1. Build the optimized version of the application:
npm run build
or
npm start
  1. Deploy the generated build directory to your production or development server.

  2. Make sure to update the Razorpay API credentials in the production environment to use your live API key and secret.

Resources

Acknowledgments

Special thanks to the Razorpay team for providing an excellent payment gateway solution.

Contact

If you have any questions or need further assistance, please don't hesitate to contact me at Linkedin.