This project demonstrates the integration of the Midtrans payment gateway utilizing Next.js as the backend.
-
Node.js & Next.js Installation:
- Ensure you have Node.js installed. If not, download and install it from here.
- Install Next.js globally or within your project by running:
npm install -g next # or npm install next
-
Configuration Setup:
- Edit the
.envfile and insert your Midtrans server and client keys.MIDTRANS_SERVER_KEY=your_server_key_here MIDTRANS_CLIENT_KEY=your_client_key_here
- Edit the
-
Install Dependencies:
- Run the following command to install project dependencies:
npm install i
- Run the following command to install project dependencies:
-
Running the Project:
- Start the development server using the command:
npm run dev - Access the application locally at
http://localhost:3000.
- Start the development server using the command:
- Make sure your Midtrans account credentials are correctly set in the
.envfile. - For detailed API documentation, refer to the Midtrans API documentation.
- This app was created as a web service for this app: flutter-midtrans-example-app.