added pollbackpayment status
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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 com.billpaymentservice.bbps.dto.ResponseModel;
|
||||
import com.billpaymentservice.bbps.dto.request.PaymentStartUserRequest;
|
||||
import com.billpaymentservice.bbps.dto.request.PollBackRequest;
|
||||
import com.billpaymentservice.bbps.service.PollBackService;
|
||||
|
||||
@RequestMapping("/payment")
|
||||
public class PaymentPollBackController {
|
||||
|
||||
|
||||
private final PollBackService pollBackService;
|
||||
|
||||
public PaymentPollBackController(PollBackService pollBackService) {
|
||||
this.pollBackService = pollBackService;
|
||||
}
|
||||
@PostMapping(value = "/pollback", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
public ResponseEntity<ResponseModel> startIntentPayment(@Validated @RequestBody PollBackRequest pollBackRequest) {
|
||||
ResponseModel response = pollBackService.managePollBack(pollBackRequest);
|
||||
return ResponseEntity.ok(response);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user