Skip to content

payOSHQ/payos-demo-java-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo payOS Spring-boot

Usage

Step 1: Download and install Java 17 and make sure you are running this project in Java 17 version

Link: Java 17

Step 2: Add payment gateway

cp ./src/main/resources/application.properties.example ./src/main/resources/application.properties
  • Add values for payOS client, all credentials can be get from my.payos.vn.

Step 3: Run the project

  • Install dependencies using the command mvn clean install
  • Run the project using the command mvn spring-boot:run
  • The project will run on port 8080

Note

Webhook Setup (Optional): For testing webhook functionality in development, you need to expose your local server using a tool like ngrok. The webhook endpoint is /payment/payos_transfer_handler (handled by PaymentController.java). After exposing your server with ngrok, register the full webhook URL (e.g., https://abc123.ngrok.io/payment/payos_transfer_handler) in your payOS dashboard at my.payos.vn or using /order/confirm-webhook with your webhook URL.

Structure

About

Demo payOS Spring-boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published