Compare commits
219
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba7a9a5f64 | ||
|
|
14f348fa50 | ||
|
|
86b6c1f25f | ||
|
|
58b628bd39 | ||
|
|
38979f0f94 | ||
|
|
46e50acc88 | ||
|
|
95e1c8b45d | ||
|
|
6126bc1d81 | ||
|
|
5d0f043848 | ||
|
|
a4842788c1 | ||
|
|
a9d04ee757 | ||
|
|
e3fdca6f72 | ||
|
|
0197f6951f | ||
|
|
7fac2cb590 | ||
|
|
596f519d1e | ||
|
|
705af33f1e | ||
|
|
ae298a35f6 | ||
|
|
f752ed269f | ||
|
|
d34b2e1b84 | ||
|
|
c8bc6e7f12 | ||
|
|
67be2acbc4 | ||
|
|
d3ae7decc8 | ||
|
|
a41dca5693 | ||
|
|
499bb1e995 | ||
|
|
4b5f81d0d5 | ||
|
|
0e747ed2a7 | ||
|
|
f9ba70414b | ||
|
|
d133fc0c75 | ||
|
|
a2f9ee8ed7 | ||
|
|
98ca620bb4 | ||
|
|
8ae11f86d4 | ||
|
|
eeb326a221 | ||
|
|
efd6a58b62 | ||
|
|
78c0e023d9 | ||
|
|
28cf0aa98d | ||
|
|
b3c507338e | ||
|
|
6079ce48a3 | ||
|
|
67404c2279 | ||
|
|
870c37e7f5 | ||
|
|
66a7677917 | ||
|
|
2da63b2f11 | ||
|
|
06cb102aed | ||
|
|
825e309785 | ||
|
|
abf89ce7f0 | ||
|
|
eb28221b96 | ||
|
|
29bce40c65 | ||
|
|
e21039090d | ||
|
|
699d8572a9 | ||
|
|
bb0aee2b2b | ||
|
|
13bfd34bbd | ||
|
|
fb3c5d2e96 | ||
|
|
2c4855d59a | ||
|
|
0e56b4de7b | ||
|
|
74e4f86d67 | ||
|
|
896ff1722a | ||
|
|
6ea6dc4775 | ||
|
|
1cfe331ff1 | ||
|
|
c25382bd5c | ||
|
|
fe4f653065 | ||
|
|
597f6b10d4 | ||
|
|
7e7b8ae9cf | ||
|
|
1e38efe3c0 | ||
|
|
66fceb95a1 | ||
|
|
a28f70d2a9 | ||
|
|
f15e967e58 | ||
|
|
693b0b7801 | ||
|
|
812aa3c2ff | ||
|
|
1ab2768226 | ||
|
|
08b0689209 | ||
|
|
aea3d0d3a8 | ||
|
|
c0dbf531bd | ||
|
|
d88c624d50 | ||
|
|
28708d1d74 | ||
|
|
003dd9325c | ||
|
|
9a9a07875c | ||
|
|
a210c86bcd | ||
|
|
78c38e6d74 | ||
|
|
58d450b22e | ||
|
|
d521459227 | ||
|
|
164c27e689 | ||
|
|
6f51608fc9 | ||
|
|
e4e1310325 | ||
|
|
e374e189a7 | ||
|
|
9634939982 | ||
|
|
0cf90f5de1 | ||
|
|
5f09755d2c | ||
|
|
c2acccc535 | ||
|
|
af15334937 | ||
|
|
3e0a04e390 | ||
|
|
12db04d222 | ||
|
|
b19868af96 | ||
|
|
29d54147d3 | ||
|
|
13ac8ad835 | ||
|
|
ff97877997 | ||
|
|
dd30885b34 | ||
|
|
81ddef90f0 | ||
|
|
4d48477410 | ||
|
|
99d8778bfe | ||
|
|
ce6a27c623 | ||
|
|
a001728c4f | ||
|
|
b33d658834 | ||
|
|
72332d6f99 | ||
|
|
2991349f8b | ||
|
|
6f53dedbe1 | ||
|
|
9bb311d7fb | ||
|
|
985f6eecfd | ||
|
|
70abea2115 | ||
|
|
ac9aaea94a | ||
|
|
c8cf2d58b7 | ||
|
|
716c93c340 | ||
|
|
b28587c5fc | ||
|
|
4f0ebba9e3 | ||
|
|
de92de7f7d | ||
|
|
d0c2c1b363 | ||
|
|
d0812656ff | ||
|
|
435ee0dacf | ||
|
|
89cb17b108 | ||
|
|
c9dfb6f9ba | ||
|
|
d8d8bdc3d3 | ||
|
|
08d5509c1a | ||
|
|
d838f4c5cf | ||
|
|
f85aa7ec06 | ||
|
|
3a7a278774 | ||
|
|
0418707d43 | ||
|
|
44cab6cc3b | ||
|
|
d46d084654 | ||
|
|
135947cfd6 | ||
|
|
f1a2d62a39 | ||
|
|
5a9524a4e8 | ||
|
|
bb38775e5b | ||
|
|
bd9d544b6c | ||
|
|
0ae072dce4 | ||
|
|
5d57f92dad | ||
|
|
32a42284f8 | ||
|
|
3322645ab1 | ||
|
|
23050efbdc | ||
|
|
e2a09b650a | ||
|
|
1aedfd890d | ||
|
|
4b9a66ba3e | ||
|
|
c3ea867fb4 | ||
|
|
3275b49397 | ||
|
|
68c7553773 | ||
|
|
71b4b0b9ab | ||
|
|
d5f709df31 | ||
|
|
4a95e88b19 | ||
|
|
1fae6d788e | ||
|
|
dad3548f3a | ||
|
|
1b71f23d25 | ||
|
|
7d0ce98f7d | ||
|
|
76c702351e | ||
|
|
061bcb0baf | ||
|
|
e28d729f4c | ||
|
|
efacb889a8 | ||
|
|
5e656b625c | ||
|
|
238ad67dbe | ||
|
|
7e8a7fdd6b | ||
|
|
9303485019 | ||
|
|
84ad9a2dec | ||
|
|
1102a58aee | ||
|
|
50b26af952 | ||
|
|
d24d920cce | ||
|
|
b0e43f53fc | ||
|
|
579220f6c6 | ||
|
|
d9973ac69a | ||
|
|
6306538185 | ||
|
|
258b1633d5 | ||
|
|
e724799400 | ||
|
|
a3b1fba928 | ||
|
|
be114c34e1 | ||
|
|
4d4e8c9d92 | ||
|
|
35a62285fd | ||
|
|
39414eea1a | ||
|
|
5612f6b322 | ||
|
|
98e9a7447c | ||
|
|
c67f222957 | ||
|
|
43baedfecd | ||
|
|
af7cdaf5d7 | ||
|
|
58db98cc06 | ||
|
|
3497d4f288 | ||
|
|
d18caaeed9 | ||
|
|
1e7b3c8a6b | ||
|
|
6ba817e54a | ||
|
|
cfac612306 | ||
|
|
fd0fbb33dc | ||
|
|
44fad92ad2 | ||
|
|
95ed0bb4b1 | ||
|
|
6b867521e3 | ||
|
|
3de3f8f60c | ||
|
|
7d6db124e7 | ||
|
|
f7c2669d11 | ||
|
|
0e590961e0 | ||
|
|
89a131fa84 | ||
|
|
d4c8b433cc | ||
|
|
2f33b306ae | ||
|
|
680d05b5bd | ||
|
|
3f27b5272a | ||
|
|
6ec6847ad2 | ||
|
|
65cd50567d | ||
|
|
78dd74475a | ||
|
|
5325f26a64 | ||
|
|
c8191b54cd | ||
|
|
92e71695a5 | ||
|
|
4d501f7b4a | ||
|
|
01394580f3 | ||
|
|
bf8de7667b | ||
|
|
10d3944b66 | ||
|
|
555ca1dae5 | ||
|
|
96b67edda5 | ||
|
|
1ec38a7412 | ||
|
|
9ddb74bfd0 | ||
|
|
a06cc89d70 | ||
|
|
cde8b79d53 | ||
|
|
33d80218b4 | ||
|
|
6b567bec14 | ||
|
|
ba40cd5851 | ||
|
|
8c77256295 | ||
|
|
93a1aacd39 | ||
|
|
035e31a528 | ||
|
|
bbdabd1d03 |
@@ -2,55 +2,42 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.2.5</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
<version>3.2.7</version> <!-- ✅ LTS and stable -->
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<groupId>com.billpaymentservice.bbps</groupId>
|
||||
<artifactId>bbps</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<name>bbps</name>
|
||||
<description>This is the bbps switch project</description>
|
||||
<url />
|
||||
<licenses>
|
||||
<license />
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer />
|
||||
</developers>
|
||||
<scm>
|
||||
<connection />
|
||||
<developerConnection />
|
||||
<tag />
|
||||
<url />
|
||||
</scm>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-spring-boot3</artifactId>
|
||||
<version>2.2.0</version> <!-- Latest stable version -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependencies>
|
||||
<!-- Core Spring Boot Starters -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- Validation -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<!-- ❌ Exclude old HttpClient 4.x -->
|
||||
<exclusion>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
@@ -59,52 +46,61 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
<version>2.13.3</version>
|
||||
</dependency>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-spring-boot3</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version> <!-- Use latest stable -->
|
||||
<scope>provided</scope>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<version>9.37</version> <!-- Use latest stable version -->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Tomcat (provided for WAR) -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Database Driver -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Resilience4j -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.5.0</version>
|
||||
<groupId>io.github.resilience4j</groupId>
|
||||
<artifactId>resilience4j-spring-boot3</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON + XML -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-xml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- JWT -->
|
||||
<dependency>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<version>9.37</version>
|
||||
</dependency>
|
||||
|
||||
<!-- HttpClient 5 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5</artifactId>
|
||||
@@ -115,32 +111,83 @@
|
||||
<artifactId>httpcore5</artifactId>
|
||||
<version>5.2.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents.core5</groupId>
|
||||
<artifactId>httpcore5-h2</artifactId>
|
||||
<version>5.2.5</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- (Optional) ✅ Fluent API for HttpClient5 (useful if you ever need
|
||||
direct HttpClient) -->
|
||||
<!-- ModelMapper -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||
<artifactId>httpclient5-fluent</artifactId>
|
||||
<version>5.3.1</version>
|
||||
<groupId>org.modelmapper</groupId>
|
||||
<artifactId>modelmapper</artifactId>
|
||||
<version>3.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- DevTools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger / OpenAPI -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JWT Runtime Implementations -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-api</artifactId>
|
||||
<version>0.11.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-impl</artifactId>
|
||||
<version>0.11.5</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt-jackson</artifactId>
|
||||
<version>0.11.5</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.17.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Configuration Processor -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -153,7 +200,7 @@
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.42</version> <!-- ✅ Required -->
|
||||
<version>1.18.30</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
@@ -162,16 +209,11 @@
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
</plugins>
|
||||
<finalName>BBPS</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.billpaymentservice.bbps.audit;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.data.annotation.CreatedBy;
|
||||
import org.springframework.data.annotation.CreatedDate;
|
||||
import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
import jakarta.persistence.Temporal;
|
||||
import jakarta.persistence.TemporalType;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@MappedSuperclass
|
||||
public abstract class Auditable<U> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@CreatedDate
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "create_date_time")
|
||||
protected Date createDateTime;
|
||||
|
||||
@LastModifiedDate
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
@Column(name = "updated_date_time")
|
||||
protected Date updatedDateTime;
|
||||
|
||||
@LastModifiedBy
|
||||
@Column(name = "updated_by")
|
||||
protected U updatedBy;
|
||||
|
||||
@CreatedBy
|
||||
@Column(name = "create_by")
|
||||
protected U createdBy;
|
||||
|
||||
@Column(name = "is_deleted")
|
||||
protected boolean isDeleted = false;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class CORSConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("*") // Or specific origin like "http://localhost:4200"
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||
.allowedHeaders("*")
|
||||
.allowCredentials(false); // Set to true if you're sending cookies
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.billpaymentservice.bbps.entites.UserEntity;
|
||||
import com.billpaymentservice.bbps.repository.UserRepository;
|
||||
|
||||
@Service
|
||||
public class CustomUserDetailsService implements UserDetailsService {
|
||||
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Override
|
||||
public UserDetails loadUserByUsername(String userMobNo) throws UsernameNotFoundException {
|
||||
|
||||
Optional<UserEntity> adminOptional = userRepository.findByMobile(userMobNo);
|
||||
|
||||
if (adminOptional.isPresent()) {
|
||||
UserEntity user = adminOptional.get();
|
||||
return new User(user.getMobile(), user.getName(), new ArrayList<>());
|
||||
} else {
|
||||
throw new UsernameNotFoundException("User not found with MobNo: " + userMobNo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.web.AuthenticationEntryPoint;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
@Component
|
||||
public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
||||
|
||||
@Override
|
||||
public void commence(HttpServletRequest request, HttpServletResponse response,
|
||||
AuthenticationException authException) throws IOException, ServletException {
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Access denied");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
import io.jsonwebtoken.ExpiredJwtException;
|
||||
import io.jsonwebtoken.MalformedJwtException;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
@Component
|
||||
public class JwtFilter extends OncePerRequestFilter {
|
||||
|
||||
private final JwtUtil jwtUtil;
|
||||
|
||||
private final CustomUserDetailsService userDetailsService;
|
||||
|
||||
public JwtFilter(JwtUtil jwtUtil, CustomUserDetailsService userDetailsService) {
|
||||
this.jwtUtil = jwtUtil;
|
||||
this.userDetailsService = userDetailsService;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
|
||||
final String authorizationHeader = request.getHeader("Authentication");
|
||||
|
||||
String mobileNo = null;
|
||||
String jwt = null;
|
||||
|
||||
if (authorizationHeader != null && authorizationHeader.startsWith("Bearer ")) {
|
||||
jwt = authorizationHeader.substring(7);
|
||||
try {
|
||||
mobileNo = jwtUtil.extractUsername(jwt);
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.out.println("unable to get jwt tokken");
|
||||
} catch (ExpiredJwtException e) {
|
||||
System.out.println("Jwt Exception jwt tokken");
|
||||
} catch (MalformedJwtException e) {
|
||||
System.out.println("invelid jwt token");
|
||||
}
|
||||
}
|
||||
|
||||
if (mobileNo != null && SecurityContextHolder.getContext().getAuthentication() == null) {
|
||||
|
||||
UserDetails userDetails = this.userDetailsService.loadUserByUsername(mobileNo);
|
||||
|
||||
if (jwtUtil.validateToken(jwt, userDetails)) {
|
||||
|
||||
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
|
||||
userDetails, null, userDetails.getAuthorities());
|
||||
authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
|
||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
||||
|
||||
} else {
|
||||
System.out.println("JWT Filter: Token validation failed for user - " + mobileNo);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
filterChain.doFilter(request, response);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import java.security.Key;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.Base64;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.SignatureAlgorithm;
|
||||
import io.jsonwebtoken.io.Decoders;
|
||||
import io.jsonwebtoken.security.Keys;
|
||||
|
||||
@Service
|
||||
public class JwtUtil {
|
||||
|
||||
@Value("${jwt.secret}")
|
||||
private String secret;
|
||||
|
||||
private final Map<String, Date> tokenBlacklist = new HashMap<>();
|
||||
|
||||
private Key getSigningKey() {
|
||||
byte[] keyBytes = Decoders.BASE64.decode(secret);
|
||||
return Keys.hmacShaKeyFor(keyBytes);
|
||||
}
|
||||
|
||||
public String generateToken(String username, String mid) {
|
||||
Map<String, Object> claims = new HashMap<>();
|
||||
claims.put("mid", mid);
|
||||
claims.put("expiryTime", new Date(System.currentTimeMillis() + BBPSConstant.JWT_EXPIRATION_MS).toString());
|
||||
return createToken(claims, username.toUpperCase());
|
||||
}
|
||||
|
||||
public String doGenerateRefreshToken(Map<String, Object> claims, String subject) {
|
||||
return Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))
|
||||
.setExpiration(new Date(System.currentTimeMillis() + BBPSConstant.REFRESH_EXPIRATION_MS))
|
||||
.signWith(getSigningKey(), SignatureAlgorithm.HS512).compact();
|
||||
}
|
||||
|
||||
public String extractUsername(String token) {
|
||||
return extractClaim(token, Claims::getSubject);
|
||||
}
|
||||
|
||||
public Date extractExpiration(String token) {
|
||||
return extractClaim(token, Claims::getExpiration);
|
||||
}
|
||||
|
||||
public <T> T extractClaim(String token, Function<Claims, T> claimsResolver) {
|
||||
final Claims claims = extractAllClaims(token);
|
||||
return claimsResolver.apply(claims);
|
||||
}
|
||||
|
||||
private Claims extractAllClaims(String token) {
|
||||
return Jwts.parserBuilder().setSigningKey(getSigningKey()).build().parseClaimsJws(token).getBody();
|
||||
}
|
||||
|
||||
private Boolean isTokenExpired(String token) {
|
||||
return extractExpiration(token).before(new Date());
|
||||
}
|
||||
|
||||
private String createToken(Map<String, Object> claims, String subject) {
|
||||
return Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))
|
||||
.setExpiration(new Date(System.currentTimeMillis() + BBPSConstant.JWT_TEMPERARY_EXPIRATION_MS))
|
||||
.signWith(getSigningKey(), SignatureAlgorithm.HS512).compact();
|
||||
}
|
||||
|
||||
private String createToken1(Map<String, Object> claims, String subject) {
|
||||
return Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))
|
||||
.setExpiration(new Date(System.currentTimeMillis() + BBPSConstant.JWT_EXPIRATION_MS))
|
||||
.signWith(getSigningKey(), SignatureAlgorithm.HS512).compact();
|
||||
}
|
||||
|
||||
// public Boolean validateToken(String token, UserDetails userDetails) {
|
||||
// final String username = extractUsername(token);
|
||||
// return true;
|
||||
// }
|
||||
|
||||
public Boolean validateToken(String token, UserDetails userDetails) {
|
||||
final String mobileNo = extractUsername(token);
|
||||
// System.out.println("Extracted mobileNo from token: " + mobileNo );
|
||||
// System.out.println("Username from UserDetails: " + userDetails.getUsername());
|
||||
return (mobileNo.equals(userDetails.getUsername()) && !isTokenExpired(token));
|
||||
}
|
||||
|
||||
public void invalidateToken(String token) {
|
||||
tokenBlacklist.put(token, new Date());
|
||||
}
|
||||
|
||||
public boolean isTokenBlacklisted(String token) {
|
||||
Date invalidationTime = tokenBlacklist.get(token);
|
||||
return invalidationTime != null && invalidationTime.before(new Date());
|
||||
}
|
||||
|
||||
public String generateToken(String mobileNo) {
|
||||
Map<String, Object> claims = new HashMap<>();
|
||||
claims.put("mobileNo", mobileNo);
|
||||
return createToken1(claims, mobileNo);
|
||||
}
|
||||
|
||||
public String generateTemperaryToken(String mobileNo) {
|
||||
Map<String, Object> claims = new HashMap<>();
|
||||
long currentTime = System.currentTimeMillis();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("hh:mm a dd/MM/yyyy");
|
||||
String formattedDate = sdf.format(new Date(currentTime));
|
||||
claims.put("mobileNo", mobileNo);
|
||||
claims.put("timestamp", formattedDate);
|
||||
return createToken(claims, mobileNo);
|
||||
}
|
||||
|
||||
public Claims parseToken(String token) {
|
||||
byte[] decodedKey = Base64.getDecoder().decode(secret);
|
||||
Key key = Keys.hmacShaKeyFor(decodedKey); // Generate the key
|
||||
|
||||
return Jwts.parserBuilder() // Use parserBuilder() instead of parser() as it's more modern
|
||||
.setSigningKey(key) // Use the Key object
|
||||
.build() // Build the JwtParser
|
||||
.parseClaimsJws(token) // Parse the JWT
|
||||
.getBody(); // Return claims
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.web.client.RestClient;
|
||||
|
||||
@Configuration
|
||||
public class RestClientConfig {
|
||||
|
||||
@Bean
|
||||
public RestClient restClient() throws Exception {
|
||||
|
||||
// Create Trust-All SSL context
|
||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||
new X509TrustManager() {
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return new X509Certificate[0];
|
||||
}
|
||||
public void checkClientTrusted(X509Certificate[] certs, String authType) {}
|
||||
public void checkServerTrusted(X509Certificate[] certs, String authType) {}
|
||||
}
|
||||
};
|
||||
|
||||
SSLContext sslContext = SSLContext.getInstance("TLS");
|
||||
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||
|
||||
// Use JDK's Simple HTTP client with custom SSL context
|
||||
SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
|
||||
requestFactory.setBufferRequestBody(false);
|
||||
|
||||
// Apply SSL context to HttpsURLConnection globally
|
||||
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
|
||||
HttpsURLConnection.setDefaultHostnameVerifier((hostname, session) -> true);
|
||||
|
||||
return RestClient.builder()
|
||||
.requestFactory(requestFactory)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.billpaymentservice.bbps.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.billpaymentservice.bbps.controller.AgentController;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.CorsConfigurationSource;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfig {
|
||||
|
||||
private final AgentController agentController;
|
||||
|
||||
private final JwtAuthenticationEntryPoint jwtAuthenticationEntryPoint;
|
||||
|
||||
private final JwtFilter jwtFilter;
|
||||
|
||||
public SecurityConfig(JwtAuthenticationEntryPoint jwtAuthenticationEntryPoint, JwtFilter jwtFilter, AgentController agentController) {
|
||||
this.jwtAuthenticationEntryPoint = jwtAuthenticationEntryPoint;
|
||||
this.jwtFilter = jwtFilter;
|
||||
this.agentController = agentController;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||
|
||||
http.csrf(csrf -> csrf.disable()).cors(cors -> cors.configurationSource(corsConfigurationSource()))
|
||||
.authorizeHttpRequests(auth -> auth
|
||||
.requestMatchers("/auth/**",
|
||||
"/v3/api-docs/**",
|
||||
"/swagger-ui/**",
|
||||
"/swagger-ui.html",
|
||||
"/swagger-resources/**",
|
||||
"/webjars/**",
|
||||
"/error")
|
||||
.permitAll()
|
||||
.requestMatchers("/payment/callback/startPayment","/complaints/checkTicketStatus")
|
||||
.permitAll().requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
|
||||
.anyRequest().authenticated())
|
||||
.exceptionHandling(ex -> ex.authenticationEntryPoint(jwtAuthenticationEntryPoint))
|
||||
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS));
|
||||
|
||||
http.addFilterBefore(jwtFilter, UsernamePasswordAuthenticationFilter.class);
|
||||
|
||||
return http.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CorsConfigurationSource corsConfigurationSource() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowedOrigins(Arrays.asList("*")); // Or use specific origin like "http://localhost:4200"
|
||||
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
|
||||
config.setAllowedHeaders(Arrays.asList("*"));
|
||||
config.setAllowCredentials(false); // true only if you're sending cookies
|
||||
|
||||
// Use UrlBasedCorsConfigurationSource as it implements CorsConfigurationSource
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
source.registerCorsConfiguration("/**", config); // Apply CORS to all paths
|
||||
return source; // Return as CorsConfigurationSource
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.BillFetchByBillIdRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.BillFetchByClientIdRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.BillValidateByClientIdRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.FetchBillRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.FetchBillValidatestRequest;
|
||||
import com.billpaymentservice.bbps.dto.response.BillDataResponse;
|
||||
import com.billpaymentservice.bbps.dto.response.FetchBillValidateResponse;
|
||||
import com.billpaymentservice.bbps.service.AgentService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/agent")
|
||||
@CrossOrigin(origins = "*")
|
||||
public class AgentController {
|
||||
|
||||
private final AgentService agentService;
|
||||
|
||||
public AgentController(AgentService agentService) {
|
||||
this.agentService = agentService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/requestBillFetch")
|
||||
@Operation(summary = "Initiate bill fetch request", description = "This API initiates a bill fetch request for the given customer/biller details.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Bill fetch request initiated successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> requestBillFetch(@Validated @RequestBody FetchBillRequest fetchBillRequest) {
|
||||
|
||||
ResponseModel response = agentService.initiateBillFetch(fetchBillRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/fetchBillById")
|
||||
@Operation(summary = "Fetch bill details by bill ID", description = "This API retrieves bill details from the BBPS system using the provided bill ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Bill details fetched successfully by bill ID", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> fetchBillById(
|
||||
@Validated @RequestBody BillFetchByBillIdRequest billFetchByBillIdRequest) {
|
||||
|
||||
ResponseModel response = agentService.fetchBillById(billFetchByBillIdRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/requestBillValidate")
|
||||
@Operation(summary = "Initiate bill validation request", description = "This API validates customer input and bill details .")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Bill validation initiated successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> requestBillValidate(
|
||||
@Validated @RequestBody FetchBillValidatestRequest fetchBillValidateRequest) {
|
||||
|
||||
ResponseModel response = agentService.initiateBillValidate(fetchBillValidateRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/requestBillValidateByBillId")
|
||||
@Operation(summary = "Bill validate by details by bill ID", description = "This API retrieves bill details from BBPS using the provided bill ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Bill details fetched successfully by bill ID", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> requestBillByBillId(
|
||||
@Validated @RequestBody BillFetchByBillIdRequest billRequest) {
|
||||
|
||||
ResponseModel response = agentService.initiateBillValidateByBillId(billRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/fetchBillByClientReqId")
|
||||
@Operation(summary = "Fetch bill details by client request ID", description = "This API fetches bill details using the client-generated request ID (clientReqId).")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Bill details fetched successfully using client request ID", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> fetchBillByClientReqId(
|
||||
@Validated @RequestBody BillFetchByClientIdRequest billFetchByClientIdRequest) {
|
||||
|
||||
ResponseModel response = agentService.fetchBillByClientReqId(billFetchByClientIdRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/fetchBillValidateByClientReqId")
|
||||
@Operation(summary = "Fetch bill details by client request ID", description = "This API retrieves bill details using the client's request ID (clientReqId).")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Bill details fetched successfully using client request ID", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> fetchBillValidateByClientReqId(
|
||||
@Validated @RequestBody BillValidateByClientIdRequest billValidateByClientIdRequest) {
|
||||
|
||||
ResponseModel response = agentService.fetchBillValidateByClientReqId(billValidateByClientIdRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/callback/billFetch")
|
||||
@Operation(summary = "Handle bill fetch callback", description = "This callback API is invoked by BBPS/Biller to send bill fetch response.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Callback received and processed successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> handleBillFetchCallback(@RequestBody BillDataResponse billDataResponse) {
|
||||
ResponseModel genralResp = agentService.processBillFetchCallback(billDataResponse);
|
||||
// Return a response indicating successful receipt
|
||||
return ResponseEntity.ok(genralResp);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/callback/billValidate")
|
||||
@Operation(summary = "Handle bill validate callback", description = "This callback API is triggered by BBPS/Biller to send bill validation response.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Callback received and processed successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> handleBillValidateCallback(
|
||||
@RequestBody FetchBillValidateResponse fetchBillValidateResponse) {
|
||||
ResponseModel genralResp = agentService.processBillValidateCallback(fetchBillValidateResponse);
|
||||
// Return a response indicating successful receipt
|
||||
return ResponseEntity.ok(genralResp);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.auth.LoginRequest;
|
||||
import com.billpaymentservice.bbps.dto.auth.RegisterRequest;
|
||||
import com.billpaymentservice.bbps.dto.auth.VerifyOtpRequest;
|
||||
import com.billpaymentservice.bbps.service.AuthService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/auth")
|
||||
@CrossOrigin(origins = "*")
|
||||
@Slf4j
|
||||
public class AuthController {
|
||||
|
||||
private final AuthService authService;
|
||||
|
||||
public AuthController(AuthService authService) {
|
||||
this.authService = authService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/sendOtp")
|
||||
@Operation(summary = "Send OTP to user", description = "This API sends an OTP to the user's registered mobile number for authentication.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "OTP sent successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> sendOtp(@Validated @RequestBody LoginRequest request) {
|
||||
log.info("Received sendOtp request for mobile: {}", request.getMobile());
|
||||
return ResponseEntity.ok(authService.sendOtp(request));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/verifyOtp")
|
||||
@Operation(summary = "Verify OTP", description = "This API verifies the OTP entered by the user and validates the authentication flow.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "OTP verified successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
|
||||
public ResponseEntity<ResponseModel> verifyOtp(@Validated @RequestBody VerifyOtpRequest request) {
|
||||
|
||||
return ResponseEntity.ok(authService.verifyOtp(request));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/register")
|
||||
@Operation(summary = "Register a new user", description = "This API registers a new user into the system by validating the provided registration details.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "User registered successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> register(@Validated @RequestBody RegisterRequest request) {
|
||||
|
||||
return ResponseEntity.ok(authService.registerUser(request));
|
||||
}
|
||||
|
||||
@PostMapping("/loginWithoutDecryption")
|
||||
@Operation(summary = "Login without decryption (Testing Only)", description = "This API is used only for testing purposes. It authenticates the user without decrypting the credentials, typically used when token generation fails or decryption flow is not enabled.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "User authenticated successfully (Testing Only)", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> login(@RequestBody LoginRequest loginRequest) {
|
||||
|
||||
return ResponseEntity.ok(authService.authenticateUser(loginRequest));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.AllMasterOptionsRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.ComplainStatusRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.ComplaintRequestDTO;
|
||||
import com.billpaymentservice.bbps.dto.request.GetTicketLatestStausRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.ViewAllComplaintsTicketsRequest;
|
||||
import com.billpaymentservice.bbps.service.ComplainService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/complaints")
|
||||
@Validated
|
||||
@CrossOrigin(origins = "*")
|
||||
public class ComplainController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ComplainController.class);
|
||||
|
||||
private final ComplainService complainService;
|
||||
|
||||
public ComplainController(ComplainService complainService) {
|
||||
this.complainService = complainService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addComplainTicket")
|
||||
@Operation(summary = "Add complaint ticket", description = "This API creates a new complaint ticket based on the provided request details.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Complaint ticket created successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> addComplain(@Validated @RequestBody ComplaintRequestDTO complainRequestDTO) {
|
||||
|
||||
ResponseModel response = complainService.addComplain(complainRequestDTO);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/checkTicketStatus")
|
||||
@Operation(summary = "Fetch latest complaint ticket status", description = "This API retrieves the latest status of a complaint ticket based on the provided ticket ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Complaint ticket status fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getComplaintStatus(
|
||||
@Validated @RequestBody GetTicketLatestStausRequest request) {
|
||||
log.info("Received complaint status request for complaintId: {}", request.getTicketId());
|
||||
ResponseModel response = complainService.getComplaintStatus(request);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/viewComplainsTicketHistory")
|
||||
@Operation(summary = "View complaint ticket history", description = "This API retrieves the full complaint history for the provided ticket ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Complaint ticket history fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> viewComplaintHistory(@Validated @RequestBody ComplainStatusRequest request) {
|
||||
log.info("Received complaint View Complaint History request for ticketId: {}", request.getTicketId());
|
||||
ResponseModel response = complainService.viewComplaintHistory(request);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping("/viewTicketById")
|
||||
@Operation(summary = "View complaint details by ID", description = "This API retrieves the complaint details for the given complaint ticket ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Complaint details fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> viewComplaintById(@Validated @RequestBody ComplainStatusRequest request) {
|
||||
log.info("Received complaint View Complaint By ID request for complaintId: {}", request.getTicketId());
|
||||
ResponseModel response = complainService.viewComplaintById(request);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping("/allMasterOptions")
|
||||
@Operation(summary = "Fetch all master options by ID", description = "This API retrieves all master option values based on the provided ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Master options fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getAllStatuses(@Validated @RequestBody AllMasterOptionsRequest request) {
|
||||
return ResponseEntity.ok(complainService.getAllActiveStatuses(request));
|
||||
}
|
||||
|
||||
@PostMapping("/viewAllComplaints")
|
||||
@Operation(summary = "View all complaints by status type", description = "This API retrieves all complaints filtered by the provided status type.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "All complaints fetched successfully based on status type", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> viewAllComplaints(
|
||||
@Validated @RequestBody ViewAllComplaintsTicketsRequest request) {
|
||||
log.info("Received request complaint View All Complaints for Status Type={}", request.getStatusType());
|
||||
ResponseModel response = complainService.ViewAllComplaints(request);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/viewAllComplaintsByUserId")
|
||||
@Operation(summary = "View all complaints by user ID", description = "This API retrieves all complaint tickets associated with the provided user ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "All complaints fetched successfully by user ID", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> viewAllComplaintsByUserId(
|
||||
@Validated @RequestBody AllMasterOptionsRequest request) {
|
||||
ResponseModel response = complainService.viewAllComplaintsByUserId(request);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,169 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.BillerDetailRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.ContactMasterRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.CustomParamRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.DispositionRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.MasterCategoryRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.MasterRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.PlanRequest;
|
||||
import com.billpaymentservice.bbps.service.MasterDataService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@RequestMapping("/masterData")
|
||||
@RestController
|
||||
@Validated
|
||||
@CrossOrigin(origins = "*")
|
||||
public class MasterDataController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MasterDataController.class);
|
||||
|
||||
private final MasterDataService masterDataService;
|
||||
|
||||
public MasterDataController(MasterDataService masterDataService) {
|
||||
this.masterDataService = masterDataService;
|
||||
}
|
||||
|
||||
@PostMapping("/getBillerById")
|
||||
public String getBillerById(@RequestBody BillerDetailRequest billerRequestRequest) {
|
||||
masterDataService.getBillerByBillerId(billerRequestRequest);
|
||||
return "Abc";
|
||||
@PostMapping(value = "/getBillerDetails")
|
||||
@Operation(summary = "Fetch biller details", description = "Get biller details by biller id and returns the result")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Biller details fetch successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getBillerDetails(@Valid @RequestBody BillerDetailRequest billerDetailRequest) {
|
||||
|
||||
log.info("Received biller details request for billerId: {}", billerDetailRequest.getBillerId());
|
||||
|
||||
return ResponseEntity.ok(masterDataService.getBillerByBillerId(billerDetailRequest));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/getContactMasterResponse")
|
||||
@Operation(summary = "Fetch contact master data", description = "Fetch contact master and returns the response")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Fetch contact master response fetch successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getContactMaster(
|
||||
@Validated @RequestBody ContactMasterRequest contactMasterRequest) {
|
||||
|
||||
return ResponseEntity.ok(masterDataService.getContactMaster(contactMasterRequest));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/getDispostionDetail")
|
||||
@Operation(summary = "Fetch disposition details", description = "Fetch disposition details for a given ticket and return the response")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Disposition details fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
public ResponseEntity<ResponseModel> getDispostionDetail(
|
||||
@Validated @RequestBody DispositionRequest dispositionDetailRequest) {
|
||||
return ResponseEntity.ok(masterDataService.getDispositionDetails(dispositionDetailRequest));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/getTicketDispositions")
|
||||
@Operation(summary = "Fetch ticket disposition details", description = "Fetch ticket disposition details for a given ticket and return the response")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Ticket disposition details fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
public ResponseEntity<ResponseModel> getTicketDispositions(
|
||||
@Validated @RequestBody DispositionRequest dispositionDetailRequest) {
|
||||
return ResponseEntity.ok(masterDataService.getTicketDispositions(dispositionDetailRequest));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/getCustomerParamDetails")
|
||||
@Operation(summary = "Fetch customer parameter details by biller ID", description = "API fetches the customer parameter configuration based on the provided biller ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Customer parameter details fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getCustomerParamDetails(
|
||||
@Validated @RequestBody CustomParamRequest customerParamRequest) {
|
||||
|
||||
log.info("Received biller details request for billerId: {}", customerParamRequest.getBillerId());
|
||||
|
||||
return ResponseEntity.ok(masterDataService.getCustomerParamByBillerId(customerParamRequest));
|
||||
}
|
||||
|
||||
@PostMapping("/getAllMastersData")
|
||||
@Operation(summary = "Fetch all master data", description = "API retrieves all the master data based on the provided .")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Master data fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseModel fetchMasterData(@Validated @RequestBody MasterRequest masterRequest) {
|
||||
return masterDataService.getMasterData(masterRequest);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/getMasterCategoryWise")
|
||||
@Operation(summary = "Fetch master data category-wise", description = "API retrieves master data based on the selected category.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Category-wise master data fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getMasterDataCategoryWise(
|
||||
@Valid @RequestBody MasterCategoryRequest masterRequest) {
|
||||
return ResponseEntity.ok(masterDataService.fetchMasterDataCategoryWise(masterRequest));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/customerParamGroupsByBillerId")
|
||||
@Operation(summary = "Fetch customer parameter groups by biller ID", description = "API retrieves all customer parameter groups configured for the specified biller ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Customer parameter groups fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getCustomerParamGroup(
|
||||
@Validated @RequestBody BillerDetailRequest requestModel) {
|
||||
return ResponseEntity.ok(masterDataService.fetchCustomerParamGroup(requestModel));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/fetchAmountOptionsByBillerId")
|
||||
@Operation(summary = "Fetch all master amount options by biller ID", description = "API retrieves all the master amount options configured for the given biller ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Master amount options fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> fetchAllMasterAmountOptionsByBillerId(
|
||||
@Validated @RequestBody BillerDetailRequest requestModel) {
|
||||
return ResponseEntity.ok(masterDataService.fetchAllMasterAmountOption(requestModel));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/fetchAllPlanCategoriesByBillerId")
|
||||
@Operation(summary = "Fetch plan categories by biller ID", description = "API retrieves all plan categories available for the specified biller ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Plan categories fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> fetchPlanCategories(@Validated @RequestBody BillerDetailRequest requestModel) {
|
||||
return ResponseEntity.ok(masterDataService.fetchPlanCategorie(requestModel));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/initiatingChannel")
|
||||
@Operation(summary = "Fetch initiating channel details by biller ID", description = "API retrieves initiating channel information configured for the specified biller ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Initiating channel details fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> initiatingChannel(@Validated @RequestBody BillerDetailRequest requestModel) {
|
||||
return ResponseEntity.ok(masterDataService.fetchInitiatingChannel(requestModel));
|
||||
}
|
||||
|
||||
@PostMapping(value = "/fetchPlanByCategoryName")
|
||||
@Operation(summary = "Fetch plans by category name", description = "API retrieves all available plans for the specified category name.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Plans fetched successfully based on category name", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> fetchPlanByCategory(@Validated @RequestBody PlanRequest requestModel) {
|
||||
return ResponseEntity.ok(masterDataService.fetchPlanByCategories(requestModel));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.BillPaymentRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.TransactionStatusRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.TrasactionStatusByClientReqIdRequest;
|
||||
import com.billpaymentservice.bbps.service.PaymentService;
|
||||
import com.billpaymentservice.bbps.service.PaymentStartService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/agent/payment")
|
||||
public class PaymentController {
|
||||
|
||||
/**
|
||||
* Fetches bill details from external BBPS service
|
||||
*/
|
||||
|
||||
private final PaymentService paymentService;
|
||||
private final PaymentStartService paymentStartService;
|
||||
|
||||
public PaymentController(PaymentService paymentService, PaymentStartService paymentStartService) {
|
||||
this.paymentService = paymentService;
|
||||
this.paymentStartService = paymentStartService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/intiatePayment")
|
||||
@Operation(summary = "Initiate payment request", description = "This API initiates the payment process for the provided bill payment request.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Payment initiated successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> requestBillFetch(
|
||||
@RequestBody BillPaymentRequest billPaymentRequest) {
|
||||
ResponseModel response = paymentService.initiatePayment(billPaymentRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/checkTransactionStatus")
|
||||
@Operation(summary = "Check transaction status", description = "This API checks the current status of a bill payment transaction using transactionId or clientReqId.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Transaction status fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> checkTransactionStatus(
|
||||
@Validated @RequestBody TransactionStatusRequest transactionStatusRequest) {
|
||||
|
||||
ResponseModel response = paymentService.checkTrasactionStatus(transactionStatusRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/checkTransactionStatusByClientReqId")
|
||||
@Operation(summary = "Check transaction status by client request ID", description = "This API checks the payment transaction status using the client-generated request ID (clientReqId).")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Transaction status fetched successfully using clientReqId", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> checkTransactionStatusByClientReqId(
|
||||
@Validated @RequestBody TrasactionStatusByClientReqIdRequest transactionStatusRequest) {
|
||||
|
||||
ResponseModel response = paymentService.checkTrasactionStatusByClientReqId(transactionStatusRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.PollBackRequest;
|
||||
import com.billpaymentservice.bbps.service.PollBackService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
|
||||
@RequestMapping("/payment")
|
||||
@RestController
|
||||
public class PaymentPollBackController {
|
||||
|
||||
private final PollBackService pollBackService;
|
||||
|
||||
public PaymentPollBackController(PollBackService pollBackService) {
|
||||
this.pollBackService = pollBackService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/pollback")
|
||||
@Operation(summary = "Process poll-back request", description = "This API handles the poll-back request from biller.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Poll Back processed successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> startIntentPayment(@Validated @RequestBody PollBackRequest pollBackRequest) {
|
||||
ResponseModel response = pollBackService.managePollBack(pollBackRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.CallbackRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.PaymentStartUserRequest;
|
||||
import com.billpaymentservice.bbps.service.PaymentStartService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/payment")
|
||||
public class PaymentStartController {
|
||||
private final PaymentStartService paymentStartService;
|
||||
|
||||
public PaymentStartController(PaymentStartService paymentStartService) {
|
||||
this.paymentStartService = paymentStartService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "/startWebPayment")
|
||||
@Operation(summary = "Start web payment process", description = "This API initiates the payment process for a web-based transaction using user and bill details.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Payment process started successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> startWebPayment(
|
||||
@Validated @RequestBody PaymentStartUserRequest paymentStartUserRequest) {
|
||||
|
||||
ResponseModel response = paymentStartService.startWebPayment(paymentStartUserRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/callback/startPayment")
|
||||
@Operation(summary = "Handle start payment callback", description = "This callback API is invoked by the payment gateway/BBPS to confirm the payment initiation status.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Start Payment Callback handled successfully", content = @Content(mediaType = "application/json")) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<Map<String, String>> handleCallback(@RequestBody CallbackRequest callbackRequest) {
|
||||
ResponseModel resp = paymentStartService.handleStartCallback(callbackRequest);
|
||||
Map<String, String> result = new HashMap<>();
|
||||
// Use the status field from ResponseModel as merchant status code string
|
||||
result.put("status", resp.getStatus());
|
||||
return ResponseEntity.ok(result);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/startIntentPayment")
|
||||
@Operation(summary = "Start intent payment process", description = "This API initiates the intent-based payment process for a user.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Intent payment started successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))), })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> startIntentPayment(
|
||||
@Validated @RequestBody PaymentStartUserRequest paymentStartUserRequest) {
|
||||
ResponseEntity.badRequest().body(new ResponseModel("PaymentStartService not available", "FAILED", 400, null));
|
||||
|
||||
ResponseModel response = paymentStartService.startIntentPayment(paymentStartUserRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.billpaymentservice.bbps.controller;
|
||||
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.PaymentHistoryByTxnRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.PaymentHistoryRequest;
|
||||
import com.billpaymentservice.bbps.service.TxnHistoryService;
|
||||
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
|
||||
import com.billpaymentservice.bbps.util.BBPSConstant;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Content;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/history")
|
||||
@CrossOrigin(origins = "*")
|
||||
@Slf4j
|
||||
public class TxnHistoryController {
|
||||
|
||||
private final TxnHistoryService txnHistory;
|
||||
|
||||
public TxnHistoryController(TxnHistoryService txnHistory) {
|
||||
this.txnHistory = txnHistory;
|
||||
|
||||
}
|
||||
|
||||
@PostMapping(value = "/paymentHistoryDetails")
|
||||
@Operation(summary = "Get payment history details", description = "This API retrieves the payment history for a user based.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Payment history fetched successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getPaymentHistory(
|
||||
@Validated @RequestBody PaymentHistoryRequest paymentHistoryRequest) {
|
||||
|
||||
ResponseModel response = txnHistory.getPaymentHistoryDetails(paymentHistoryRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/paymentHistoryByTxnId")
|
||||
@Operation(summary = "Get payment history by transaction ID", description = "This API retrieves the payment details for a specific transaction using the provided transaction ID.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Payment history fetched successfully by transaction ID", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
|
||||
@ApiDocCommonResponses
|
||||
public ResponseEntity<ResponseModel> getPaymentHistoryByTxnId(
|
||||
@Validated @RequestBody PaymentHistoryByTxnRequest request) {
|
||||
|
||||
ResponseModel response = txnHistory.getPaymentHistoryDetailsByTxnId(request);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AdditionalInfo {
|
||||
|
||||
private UUID planAdditionalInfoId;
|
||||
private List<PlanTag> tags;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AdditionalInfoBillDTO {
|
||||
private String additionalInfoId;
|
||||
private String name;
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AdditionalInfoBillValidateDTO {
|
||||
String name;
|
||||
String value;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AdditionalInfoDTO {
|
||||
@NotBlank(message = "Param Config ID cannot be blank")
|
||||
private String paramConfigId;
|
||||
|
||||
@NotBlank(message = "Param name cannot be blank")
|
||||
private String paramName;
|
||||
|
||||
private String dataTypeDAO;
|
||||
private String dataTypeModel;
|
||||
private boolean optional;
|
||||
private boolean visibility;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AgentFundTransfer {
|
||||
@NotBlank private String fundTxnReferenceId;
|
||||
@NotBlank private String fundTxnRemarks;
|
||||
@NotBlank private String fundTxnDate;
|
||||
@NotNull private Double fundTxnAmt;
|
||||
@NotBlank private String fundUTR;
|
||||
|
||||
private String fundRespRemarks;
|
||||
private String agentNpciId;
|
||||
private String txnRefId;
|
||||
private String tenantId;
|
||||
@NotBlank private String fundStatus; // FUND_TRANSFER_SUCCESS or FUND_TRANSFER_FAILED
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class AmountOptionDTO{
|
||||
private String amountOptionId; // Matches "amountOptionId" from JSON
|
||||
private List<String> amountBreakupSets; // Reference to BillerResponseParams (only ID, not full entity)
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillAdditionalInfoDTO {
|
||||
|
||||
private String additionalInfoId;
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillCustomerParamsDTO {
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillerAdditonalInfoDTO {
|
||||
private String paramConfigId;
|
||||
private String paramName;
|
||||
private String dataTypeDAO;
|
||||
private String dataTypeModel;
|
||||
private boolean optional;
|
||||
private boolean visibility;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@ToString
|
||||
public class BillerDTO {
|
||||
|
||||
@NotBlank(message = "Biller ID is mandatory")
|
||||
@Size(min = 14, max = 14, message = "Biller ID must be 14 characters long")
|
||||
private String billerId;
|
||||
|
||||
@NotBlank(message = "Biller name cannot be blank")
|
||||
private String billerName;
|
||||
|
||||
@NotBlank(message = "Biller alias name cannot be blank")
|
||||
private String billerAliasName;
|
||||
|
||||
@NotBlank(message = "Biller category name cannot be blank")
|
||||
private String billerCategoryName;
|
||||
|
||||
@NotBlank(message = "Biller mode cannot be blank")
|
||||
private String billerMode;
|
||||
|
||||
private boolean billerAcceptsAdhoc;
|
||||
|
||||
private boolean parentBiller;
|
||||
|
||||
@NotBlank(message = "Parent biller ID cannot be blank")
|
||||
private String parentBillerId;
|
||||
|
||||
@NotBlank(message = "Biller ownership is required (PSU or Private)")
|
||||
private String billerOwnerShp;
|
||||
|
||||
@NotBlank(message = "Biller coverage cannot be blank")
|
||||
private String billerCoverage;
|
||||
|
||||
@NotBlank(message = "Fetch requirement is mandatory")
|
||||
private String fetchRequirement;
|
||||
|
||||
@NotBlank(message = "Payment amount exactness is required")
|
||||
private String paymentAmountExactness;
|
||||
|
||||
@NotBlank(message = "Support bill validation is required")
|
||||
private String supportBillValidation;
|
||||
|
||||
@NotBlank(message = "Effective from date is required")
|
||||
private String billerEffctvFrom;
|
||||
|
||||
@NotBlank(message = "Effective to date is required")
|
||||
private String billerEffctvTo;
|
||||
|
||||
private String billerTempDeactivationStart;
|
||||
|
||||
private String billerTempDeactivationEnd;
|
||||
|
||||
@NotBlank(message = "Biller description cannot be blank")
|
||||
private String billerDescription;
|
||||
|
||||
@NotBlank(message = "Biller response type is required (SINGLE or SELECTIVE)")
|
||||
private String billerResponseType;
|
||||
|
||||
@NotBlank(message = "Plan MDM requirement cannot be blank")
|
||||
private String planMDMRequirement;
|
||||
|
||||
@NotBlank(message = "Status must be ACTIVE or INACTIVE")
|
||||
private String status;
|
||||
|
||||
@NotBlank(message = "Support deemed value is required (Yes/No)")
|
||||
private String supportDeemed;
|
||||
|
||||
@NotBlank(message = "Support pending status is required (Yes/No)")
|
||||
private String supportPendingStatus;
|
||||
|
||||
@NotBlank(message = "Biller timeout is required")
|
||||
private String billerTimeOut;
|
||||
|
||||
private String routeUrl;
|
||||
|
||||
private String upmsEnabled;
|
||||
|
||||
private String clickpayEnabled;
|
||||
|
||||
private String deemedSuccessEnabled;
|
||||
|
||||
private String selectionType;
|
||||
|
||||
// ✅ Nested lists and objects — matching API structure
|
||||
private List<PaymentModeDTO> billerPaymentModes;
|
||||
private List<PaymentChannelDTO> billerPaymentChannels;
|
||||
private List<CustomerParamDTO> billerCustomerParams;
|
||||
|
||||
private CustomerParamGroupsDTO customerParamGroups;
|
||||
private BillerResponseParamsDTO billerResponseParams;
|
||||
|
||||
private List<AdditionalInfoDTO> billerAdditionalInfos;
|
||||
private List<BillerAdditonalInfoDTO> billerAdditionalInfoPayments;
|
||||
|
||||
private List<InterchangeFeeConfDTO> interchangeFeeConves;
|
||||
private List<InterchangeFeeDTO> interchangeFees;
|
||||
|
||||
private BillerPlanResponseParamsDTO billerPlanResponseParams;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillerIconDTO {
|
||||
|
||||
private String icon_data; // Base64 or image data
|
||||
private String icon_type;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@ToString
|
||||
public class BillerPlanResponseParamsDTO {
|
||||
private String billerPlanResponseId;
|
||||
private String paramsJson;
|
||||
private String amountOptionsJson;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillerResponseBill {
|
||||
private String billId;
|
||||
private String amount;
|
||||
private String billDate;
|
||||
private String billNumber;
|
||||
private String billPeriod;
|
||||
private String custConvFee;
|
||||
private String couCustConvFee;
|
||||
private String dueDate;
|
||||
private String customerName;
|
||||
private boolean amountOption;
|
||||
private List<Detail> tagList; // null in response, so keeping Object
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillerResponseParamsDTO {
|
||||
|
||||
private String billerResponseId;
|
||||
private List<String> params;
|
||||
private List<AmountOptionDTO> amountOptions;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ChannelDTO {
|
||||
|
||||
private UUID channelId; // Machine-generated Unique ID assigned internally
|
||||
private String channelName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CheckClientBillerResponseDTO {
|
||||
|
||||
private String billId;
|
||||
private String amount;
|
||||
private String billDate;
|
||||
private String billNumber;
|
||||
private String billPeriod;
|
||||
private String custConvFee;
|
||||
private String couCustConvFee;
|
||||
private String dueDate;
|
||||
private String customerName;
|
||||
private Boolean amountOption;
|
||||
|
||||
private List<Detail> tagList;
|
||||
|
||||
// Conditional fields
|
||||
private List<BillAdditionalInfoDTO> additionalInfo; // C
|
||||
private List<BillCustomerParamsDTO> customerParams; // C
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CloseComplaintDTO {
|
||||
|
||||
private String complaintId;
|
||||
private String complaintDescr;
|
||||
private String complaintDispos;
|
||||
private String complaintType;
|
||||
private String txnId;
|
||||
private String complaintStatus;
|
||||
private String assignedTo;
|
||||
private String complaintNpciId;
|
||||
private String complaintRaisedFrom;
|
||||
private String userId;
|
||||
private String status;
|
||||
private String refId;
|
||||
private String estimatedTAT;
|
||||
private String creationDate; // ISO 8601 format
|
||||
private String modifiedDate; // ISO 8601 format
|
||||
private String billerName;
|
||||
private String txnAmount;
|
||||
private String superLevelEsc; // True/False
|
||||
private String openComplaint; // Y/N
|
||||
private String reopenComplaint; // Y/N
|
||||
private String remarks;
|
||||
private String agentId;
|
||||
private String category;
|
||||
private Long createdEpochDate; // UNIX timestamp
|
||||
private Long modifiedEpochDate; // UNIX timestamp
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplainDetailsDto {
|
||||
|
||||
@JsonProperty("TicketId")
|
||||
private String TicketId;
|
||||
@JsonProperty("TicketNpciId")
|
||||
private String TicketNpciId;
|
||||
@JsonProperty("TxnId")
|
||||
private String TxnId;
|
||||
@JsonProperty("TxnNpciId")
|
||||
private String TxnNpciId;
|
||||
@JsonProperty("TicketStatus")
|
||||
private String TicketStatus;
|
||||
@JsonProperty("TicketType")
|
||||
private String TicketType;
|
||||
@JsonProperty("TicketDespo")
|
||||
private String TicketDespo;
|
||||
@JsonProperty("TicketDescr")
|
||||
private String TicketDescr;
|
||||
@JsonProperty("TicketRaisedBy")
|
||||
private String TicketRaisedBy;
|
||||
@JsonProperty("CreatedTime")
|
||||
private String CreatedTime;
|
||||
@JsonProperty("TxnAmount")
|
||||
private String TxnAmount;
|
||||
@JsonProperty("TotalTxnAmount")
|
||||
private String TotalTxnAmount;
|
||||
@JsonProperty("BillCategory")
|
||||
private String BillCategory;
|
||||
@JsonProperty("BillerName")
|
||||
private String BillerName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplaintDetailsDTO {
|
||||
private String refId; // UUID
|
||||
private String txnNpciId; // Complaint description
|
||||
private String ticketId; // Complaint disposition
|
||||
private String ticketType;
|
||||
private String ticketNpciId; // Transaction ID
|
||||
private String ticketDesp; // Transaction NPCI ID
|
||||
private String ticketDesr; // Assigned person
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplaintHistoryDTO {
|
||||
|
||||
private String historyId;
|
||||
private String ticketId;
|
||||
private String time;
|
||||
private String historyStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplaintResponseDto {
|
||||
|
||||
private String ticketId;
|
||||
private String ticketType;
|
||||
private String txnNpciId;
|
||||
private String status;
|
||||
private String userId;
|
||||
private String ticketDesp;
|
||||
private String ticketDesr;
|
||||
|
||||
private List<ComplaintStatusDto> complaintStatusList;
|
||||
private List<ComplaintHistoryDTO> historyList;
|
||||
private List<ComplaintStatusDetailsDto> statusDetailsList;
|
||||
private List<ViewAllComplaintDto> viewAllList;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplaintStatusDetailsDto {
|
||||
|
||||
private String ticketStatus;
|
||||
private String ticketType;
|
||||
private String txnAmount;
|
||||
private String billerName;
|
||||
private String ticketId;
|
||||
private String totalTxnAmount;
|
||||
private String billCategory;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplaintStatusDto {
|
||||
|
||||
private String ticketId;
|
||||
private String npciTicketStatus;
|
||||
private String ticketDespo;
|
||||
private String createdTime;
|
||||
private String npciTicketType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ContactMaster {
|
||||
private String mobNo;
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomParamDTO {
|
||||
private String customParamName;
|
||||
private String dataType;
|
||||
private boolean optional;
|
||||
private int minLength;
|
||||
private int maxLength;
|
||||
private String regex;
|
||||
private boolean visibility;
|
||||
private List<String> values;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class CustomerParamDAO {
|
||||
public CustomerParamDAO(String name, String value, String type) {
|
||||
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.type = type;
|
||||
}
|
||||
private String paramsId;
|
||||
private String name;
|
||||
private String value;
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomerParamDTO {
|
||||
private String paramConfigId;
|
||||
@NotBlank(message = "Parameter name is required")
|
||||
private String paramName;
|
||||
private String dataTypeDAO;
|
||||
private String dataTypeModel;
|
||||
private boolean optional;
|
||||
@Min(0)
|
||||
private int minLength;
|
||||
@Min(0)
|
||||
private int maxLength;
|
||||
private String regex;
|
||||
private boolean visibility;
|
||||
// ✅ List of possible values
|
||||
private List<String> values;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomerParamGroupsDTO {
|
||||
private List<GroupDTO> groups;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomerParamsRequest {
|
||||
private List<Tag> tags;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -10,6 +12,7 @@ import lombok.Setter;
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Detail {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DeviceBlockTag {
|
||||
private String name;
|
||||
private String tagId;
|
||||
private String value;
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DeviceDetail {
|
||||
|
||||
private List<Detail> detail;
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DispositionsDTO {
|
||||
private String dispositionId;
|
||||
private String dispositionDescr;
|
||||
private String tenantId;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class FaqDetailsResponse {
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class GeneralResp {
|
||||
private String statusCode;
|
||||
private String status;
|
||||
private String message;
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class GroupDTO {
|
||||
|
||||
private String groupId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String input;
|
||||
|
||||
private List<String> params;
|
||||
|
||||
// 🔁 Nested child groups
|
||||
private List<GroupDTO> groups;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@ToString
|
||||
public class InterchangeFeeConfDTO {
|
||||
@NotBlank(message = "Interchange Fee Config ID cannot be blank")
|
||||
private String interChangeFeeConfId;
|
||||
|
||||
private String mti;
|
||||
private String paymentMode;
|
||||
private String paymentChannel;
|
||||
private String responseCode;
|
||||
|
||||
private List<String> fees;
|
||||
private boolean defaultFee;
|
||||
private String effctvFrom;
|
||||
private String effctvTo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@ToString
|
||||
public class InterchangeFeeDTO {
|
||||
@NotBlank(message = "Interchange Fee ID cannot be blank")
|
||||
private String interchangeFeeId;
|
||||
|
||||
@NotBlank(message = "Fee code is mandatory")
|
||||
private String feeCode;
|
||||
|
||||
private String feeDesc;
|
||||
private String feeDirection;
|
||||
|
||||
// ✅ One-to-Many relation represented by DTO list
|
||||
private List<InterchangeFeeDetailDTO> interchangeFeeDetails;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InterchangeFeeDetailDTO {
|
||||
|
||||
private String interchangeFeeDetId;
|
||||
|
||||
private long tranAmtRangeMax;
|
||||
|
||||
private long tranAmtRangeMin;
|
||||
|
||||
private double percentFee;
|
||||
|
||||
private double flatFee;
|
||||
|
||||
private String effctvFrom;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.response.CategoryResponse;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MasterApiResponse {
|
||||
|
||||
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
|
||||
private GeneralResp generalResp;
|
||||
private List<CategoryResponse> categoryRespList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class MasterCategoryBillerResponse {
|
||||
|
||||
private String billerId;
|
||||
private String billerName;
|
||||
private String billerType;
|
||||
private String billerCategory;
|
||||
private String billerCoverage;
|
||||
private String billerResponseType;
|
||||
private String billerDescription;
|
||||
private String planMDMRequirement;
|
||||
private String adhocBiller;
|
||||
private String paymentAmountExactness;
|
||||
private BillerIconDTO biller_icon;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PaymentChannelDTO {
|
||||
private String paymentChannelLimitId;
|
||||
|
||||
@NotBlank(message = "Payment channel is required")
|
||||
private String paymentChannel;
|
||||
|
||||
@Min(value = 0, message = "Max limit cannot be negative")
|
||||
private long maxLimit;
|
||||
|
||||
@Min(value = 0, message = "Min limit cannot be negative")
|
||||
private long minLimit;
|
||||
|
||||
private String supportPendingStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@ToString
|
||||
public class PaymentModeDTO {
|
||||
@NotBlank(message = "Payment model limit ID cannot be blank")
|
||||
private String paymentModelLimitId;
|
||||
|
||||
@NotBlank(message = "Payment mode is mandatory")
|
||||
private String paymentMode;
|
||||
|
||||
@PositiveOrZero(message = "Max limit must be zero or positive")
|
||||
private long maxLimit;
|
||||
|
||||
@PositiveOrZero(message = "Min limit must be zero or positive")
|
||||
private long minLimit;
|
||||
|
||||
@Pattern(regexp = "^(Yes|No)?$", message = "Support pending status must be either 'Yes' or 'No'")
|
||||
private String supportPendingStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PaymentPollBackResponse {
|
||||
private String txnId;
|
||||
private String orderId;
|
||||
private String txnStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PaymentStartReturnDto {
|
||||
private String amount;
|
||||
private String orderNo;
|
||||
private String created_on;
|
||||
private String qrString;
|
||||
private String txnId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PaymentStatusDataResponse {
|
||||
private String amount;
|
||||
private String orderNo;
|
||||
private String created_on;
|
||||
private String qrString;
|
||||
private String mid;
|
||||
private String txnId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PlanDTO {
|
||||
|
||||
private String planId;
|
||||
private String description;
|
||||
private String billerId;
|
||||
private String categoryType;
|
||||
private List<String> categorySubType; // comes as empty array []
|
||||
private String amountInRupees; // numeric but mapped as String for safety
|
||||
private String effctvFrom;
|
||||
private String effctvTo;
|
||||
private String status;
|
||||
private AdditionalInfo additionalInfo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PlanTag {
|
||||
|
||||
private UUID tagId;
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class PlansListDTO {
|
||||
|
||||
private List<PlanDTO> plans;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class RemitterIdentity {
|
||||
private String name;
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class ResponseModel<T> {
|
||||
|
||||
private String message;
|
||||
private String status;
|
||||
private int statusCode;
|
||||
private Object data;
|
||||
private Object duplicateData;
|
||||
private int size;
|
||||
|
||||
public ResponseModel(String message, String status, int statusCode, Object data) {
|
||||
super();
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.statusCode = statusCode;
|
||||
this.data = data;
|
||||
|
||||
}
|
||||
public ResponseModel(String message, String status, int statusCode, Object data,Object data1) {
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.statusCode = statusCode;
|
||||
this.data = data;
|
||||
this.duplicateData=data1;
|
||||
}
|
||||
|
||||
public ResponseModel(String message, String status, int statusCode, Object data, int size) {
|
||||
super();
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.statusCode = statusCode;
|
||||
this.data = data;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class Tag {
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class TicketDetailsDTO {
|
||||
|
||||
private String ticketId;
|
||||
private String ticketNpciId;
|
||||
private String txnNpciId;
|
||||
private String ticketType;
|
||||
private String ticketDespo;
|
||||
private String ticketDescr;
|
||||
private String status;
|
||||
|
||||
private String npciTicketType;
|
||||
private String npciTicketStatus;
|
||||
|
||||
private String createdTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class TicketDispositionsDTO {
|
||||
|
||||
private String dispositionId;
|
||||
private String dispositionDescr;
|
||||
private String tenantId;
|
||||
private String dispositionCode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class TransactionDTO {
|
||||
|
||||
@JsonProperty("txnId")
|
||||
@NotBlank private String bankTxnId;
|
||||
@NotBlank private String refId;
|
||||
private String txnNpciId;
|
||||
private String paymentRefId;
|
||||
private String remitterName;
|
||||
|
||||
|
||||
@NotBlank private String orderId;
|
||||
@NotBlank private String billId;
|
||||
@NotBlank private String userType;
|
||||
@NotBlank private String userId;
|
||||
|
||||
@NotNull private Double txnAmount;
|
||||
@NotNull private Double totalTxnAmount;
|
||||
|
||||
@NotBlank private String billerId;
|
||||
@NotBlank private String billerCategory;
|
||||
@NotBlank private String billerName;
|
||||
|
||||
private String clientReqId;
|
||||
private String offUsPay;
|
||||
private String splitPay;
|
||||
private String quickPay;
|
||||
private String paymentMode;
|
||||
private String agentPaymentInformation;
|
||||
|
||||
private Double custConvFee;
|
||||
private String currency;
|
||||
private String status;
|
||||
private String requestedIp;
|
||||
private String customerMobNo;
|
||||
private String macAddress;
|
||||
|
||||
private Double splitPayAmount;
|
||||
private Double couCustConvFee;
|
||||
|
||||
private Boolean settlementVerification;
|
||||
private String fundTxnType;
|
||||
private String reason;
|
||||
|
||||
private String amountTags;
|
||||
private String customerParamsDAOS;
|
||||
private String paymentInformation;
|
||||
private List<DeviceBlockTag> deviceBlockTags;
|
||||
private List<CustomerParamDAO> customerParamsDAO;
|
||||
|
||||
private String planId;
|
||||
private String planType;
|
||||
|
||||
// ✅ Date fields as String (for JSON compatibility)
|
||||
@JsonProperty("creationDate")
|
||||
private String creationDateBank;
|
||||
@JsonProperty("modifiedDate")
|
||||
private String modifiedDateBank;
|
||||
@JsonProperty("createdEpochDate")
|
||||
private Long createdEpochDateBank;
|
||||
@JsonProperty("modifiedEpochDate")
|
||||
private Long modifiedEpochDateBank;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class TransactionHistoryMasterDTO {
|
||||
|
||||
private String bankTxnId;
|
||||
private String txnId;
|
||||
private String clientUserId;
|
||||
private String mid;
|
||||
private String reqId;
|
||||
private String refId;
|
||||
private String txnNpciId;
|
||||
private String paymentRefId;
|
||||
private String remitterName;
|
||||
private String orderId;
|
||||
private String billId;
|
||||
private String userType;
|
||||
private String userId;
|
||||
private String txnAmount;
|
||||
private String totalTxnAmount;
|
||||
private String billerId;
|
||||
private String billerCategory;
|
||||
private String billerName;
|
||||
private String clientReqId;
|
||||
private String offUsPay;
|
||||
private String splitPay;
|
||||
private String quickPay;
|
||||
private String paymentMode;
|
||||
private String agentPaymentInformation;
|
||||
private String custConvFee;
|
||||
private String currency;
|
||||
private String status;
|
||||
private String requestedIp;
|
||||
private String customerMobNo;
|
||||
private String macAddress;
|
||||
private String splitPayAmount;
|
||||
private String couCustConvFee;
|
||||
private String settlementVerification;
|
||||
private String fundTxnType;
|
||||
private String reason;
|
||||
private String amountTags;
|
||||
private String paymentInformation;
|
||||
private String planId;
|
||||
private String planType;
|
||||
private String creationDate;
|
||||
private String modifiedDate;
|
||||
private Long createdEpochDate;
|
||||
private Long modifiedEpochDate;
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class TransactionHistoryParticularDetailsDTO {
|
||||
|
||||
private String billerCategory;
|
||||
|
||||
private String billerName;
|
||||
|
||||
private String totalTxnAmount;
|
||||
|
||||
private String bankTxnId;
|
||||
|
||||
private String txnId;
|
||||
|
||||
private String creationDate;
|
||||
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class UserDetailsDTO {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String userEmailId;
|
||||
|
||||
private String userMobNo;
|
||||
|
||||
private String userName;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class ViewAllComplaintDto {
|
||||
|
||||
private String ticketStatus;
|
||||
private String txnAmount;
|
||||
private String billerName;
|
||||
private String ticketId;
|
||||
private String txnNpciId;
|
||||
private String ticketType;
|
||||
private String createdTime;
|
||||
private String billCategory;
|
||||
private String totalTxnAmount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.billpaymentservice.bbps.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ViewComplaintDTO {
|
||||
|
||||
@JsonProperty("TicketId")
|
||||
private String ticketId;
|
||||
|
||||
@JsonProperty("TicketNpciId")
|
||||
private String ticketNpciId;
|
||||
|
||||
@JsonProperty("TxnId")
|
||||
private String txnId;
|
||||
|
||||
@JsonProperty("TxnNpciId")
|
||||
private String txnNpciId;
|
||||
|
||||
@JsonProperty("TicketStatus")
|
||||
private String ticketStatus;
|
||||
|
||||
@JsonProperty("TicketType")
|
||||
private String ticketType;
|
||||
|
||||
@JsonProperty("TicketDespo")
|
||||
private String ticketDespo;
|
||||
|
||||
@JsonProperty("TicketDescr")
|
||||
private String ticketDescr;
|
||||
|
||||
@JsonProperty("TicketRaisedBy")
|
||||
private String ticketRaisedBy;
|
||||
|
||||
@JsonProperty("CreatedTime")
|
||||
private String creationDate;
|
||||
|
||||
@JsonProperty("TxnAmount")
|
||||
private String txnAmount;
|
||||
|
||||
@JsonProperty("TotalTxnAmount")
|
||||
private String totalTxnAmount;
|
||||
|
||||
@JsonProperty("BillCategory")
|
||||
private String billCategory;
|
||||
|
||||
@JsonProperty("BillerName")
|
||||
private String billerName;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class AuthResponse {
|
||||
private boolean success;
|
||||
private String message;
|
||||
private boolean userExists;
|
||||
private Object user;
|
||||
private String token;
|
||||
|
||||
public AuthResponse(boolean success, String message, String token, Object user) {
|
||||
this.success = success;
|
||||
this.message = message;
|
||||
this.token = token;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public AuthResponse(boolean success, String message, String token) {
|
||||
this.success = success;
|
||||
this.message = message;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Getter
|
||||
@Setter
|
||||
public class LoginRequest {
|
||||
|
||||
@NotNull(message = "Mobile number cannot be null.")
|
||||
@Size(min = 10, max = 10, message = "Mobile number must be exactly 10 digits.")
|
||||
@Pattern(regexp = "^[0-9]{10}$", message = "Mobile number must contain only digits.")
|
||||
private String mobile;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OtpSendResponse {
|
||||
private boolean success;
|
||||
private String message;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.request.BaseClass;
|
||||
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RegisterRequest extends BaseClass {
|
||||
|
||||
@NotNull(message = "Mobile number cannot be null.")
|
||||
@Size(min = 10, max = 10, message = "Mobile number must be exactly 10 digits.")
|
||||
@Pattern(regexp = "^[0-9]{10}$", message = "Mobile number must contain only 10 digits.")
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "Name cannot be null.")
|
||||
@Size(min = 2, max = 100, message = "Name must be between 2 and 100 characters.")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "Email cannot be null.")
|
||||
@Email(message = "Email must be a valid email address.")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "Registration token cannot be null.")
|
||||
private String registrationToken;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserDto {
|
||||
private String userId;
|
||||
private String mobile;
|
||||
private String name;
|
||||
private String email;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.billpaymentservice.bbps.dto.auth;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class VerifyOtpRequest {
|
||||
|
||||
@NotNull(message = "Mobile number cannot be null.")
|
||||
@Size(min = 10, max = 10, message = "Mobile number must be exactly 10 digits.")
|
||||
@Pattern(regexp = "^[0-9]{10}$", message = "Mobile number must contain only digits.")
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "OTP cannot be null.")
|
||||
@Size(min = 6, max = 6, message = "OTP must be exactly 6 digits.")
|
||||
@Pattern(regexp = "^[0-9]{6}$", message = "OTP must contain only 6 digits.")
|
||||
private String otp;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AllMasterOptionsRequest extends BaseClass {
|
||||
|
||||
private Integer pageNo = 0;
|
||||
|
||||
@NotNull(message = "pageEnd is required")
|
||||
@Min(value = 1, message = "pageEnd must be greater than 0")
|
||||
private Integer pageSize;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class AmountBreakRequest {
|
||||
private String name;
|
||||
private double value;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.billpaymentservice.bbps.dto.DeviceDetail;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public abstract class BaseClass {
|
||||
|
||||
|
||||
@NotBlank(message = "MID cannot be null or blank")
|
||||
private String mid;
|
||||
|
||||
|
||||
@NotBlank(message = "Secret key cannot be null or blank")
|
||||
private String secretKey;
|
||||
|
||||
@NotBlank(message = "Request ID cannot be null or blank")
|
||||
private String reqId;
|
||||
|
||||
private String clientUserId;
|
||||
|
||||
private DeviceDetail deviceDetial;
|
||||
// ✅ 10 User Defined Fields (UDF1–UDF10)
|
||||
private String udf1;
|
||||
|
||||
private String udf2;
|
||||
|
||||
private String udf3;
|
||||
|
||||
private String udf4;
|
||||
|
||||
private String udf5;
|
||||
|
||||
private String udf6;
|
||||
|
||||
private String udf7;
|
||||
|
||||
private String udf8;
|
||||
|
||||
private String udf9;
|
||||
|
||||
private String udf10;
|
||||
private String udf11;
|
||||
private String udf12;
|
||||
private String udf13;
|
||||
private String udf14;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillFetchByBillIdRequest extends BaseClass {
|
||||
|
||||
@NotBlank(message = "bill id not be null")
|
||||
private String billId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class BillFetchByClientIdRequest extends BaseClass{
|
||||
|
||||
private String clientReqId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class BillPaymentRequest extends BaseClass {
|
||||
|
||||
private String refId;
|
||||
|
||||
private String billId;
|
||||
|
||||
// Change the field to Boolean (wrapper) type to allow @NotNull validation
|
||||
private boolean amountOptions; // Changed to Boolean (wrapper type)
|
||||
|
||||
private String paymentMode;
|
||||
|
||||
private String paymentInformation;
|
||||
|
||||
private String billerId;
|
||||
|
||||
private String billerName;
|
||||
|
||||
private String billerCategory;
|
||||
|
||||
private String macAdress;
|
||||
|
||||
private String customerMobNo;
|
||||
|
||||
private Integer txnAmount; // Changed to @NotNull as it's an Integer (non-nullable)
|
||||
|
||||
private String paymentRefId;
|
||||
|
||||
private String clientReqId;
|
||||
|
||||
private String paymentChannel;
|
||||
|
||||
private List<DeviceBlockTagRequest> deviceBlockTags;
|
||||
private List<CustomerParamTagRequest> customerParams;
|
||||
private List<RemitterIdentityRequest> remitterIdentity;
|
||||
private List<AmountBreakRequest> amountBreakSet;
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class BillValidateByClientIdRequest extends BaseClass{
|
||||
|
||||
private String clientReqId;
|
||||
|
||||
}
|
||||
@@ -1,9 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.billpaymentservice.bbps.entites.BaseClass;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BillerDetailRequest extends BaseClass{
|
||||
|
||||
@NotBlank(message = "biller id not be null")
|
||||
private String billerId;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CallbackRequest {
|
||||
@NotBlank(message = "mid is mandatory")
|
||||
private String mid;
|
||||
@NotBlank(message = "data is mandatory")
|
||||
private String data;
|
||||
@NotBlank(message = "signature is mandatory")
|
||||
private String signature;
|
||||
|
||||
public String getMid() {
|
||||
return mid;
|
||||
}
|
||||
|
||||
public void setMid(String mid) {
|
||||
this.mid = mid;
|
||||
}
|
||||
|
||||
public String getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getSignature() {
|
||||
return signature;
|
||||
}
|
||||
|
||||
public void setSignature(String signature) {
|
||||
this.signature = signature;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CloseComplaintRequest extends BaseClass {
|
||||
|
||||
@NotBlank(message = "complaintDescr not be null")
|
||||
private String complaintDescr;
|
||||
|
||||
@NotBlank(message = "complaintId not be null")
|
||||
private String complaintId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplainStatusRequest extends BaseClass {
|
||||
|
||||
@NotBlank(message = "ticketId Id cannot be null or blank")
|
||||
private String ticketId;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class ComplaintRequestDTO extends BaseClass {
|
||||
|
||||
@NotBlank(message = "Ticket description cannot be null.")
|
||||
private String ticketDescription;
|
||||
|
||||
@NotBlank(message = "Ticket disposition cannot be null.")
|
||||
private String ticketDisposition;
|
||||
|
||||
@NotBlank(message = "Ticket disposition code cannot be null.")
|
||||
private String ticketDispositionCode;
|
||||
|
||||
@NotBlank(message = "Transaction ID cannot be null.")
|
||||
private String txnId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
|
||||
public class ContactMasterRequest extends BaseClass {
|
||||
private String category;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomParamRequest extends BaseClass {
|
||||
|
||||
@NotBlank(message = "biller id not be null")
|
||||
private String billerId;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class CustomerParamTagRequest {
|
||||
private String name;
|
||||
private String value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.billpaymentservice.bbps.dto.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class DeviceBlockTagRequest {
|
||||
private String name;
|
||||
private String value;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user