working web based and intent

This commit is contained in:
Lincpay Tech
2025-12-03 11:36:28 +05:30
parent 9634939982
commit e374e189a7
11 changed files with 303 additions and 84 deletions
@@ -59,22 +59,7 @@ public class PaymentController {
}
@PostMapping(value="/callback/paymentIntiate", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> handleBillValidateCallback(@RequestBody TransactionStatusResponse transactionStatusResponse) {
ResponseModel genralResp=paymentService.handlePaymentIntiateCallback(transactionStatusResponse);
// Return a response indicating successful receipt
return ResponseEntity.ok(genralResp);
}
@PostMapping(value = "/startPayment", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> startPayment(@Validated @RequestBody PaymentStartUserRequest paymentStartUserRequest) {
if (this.paymentStartService == null) {
// Defensive: if bean not injected, return failure
return ResponseEntity.badRequest().body(new ResponseModel("PaymentStartService not available", "FAILED", 400, null));
}
ResponseModel response = paymentStartService.startPayment(paymentStartUserRequest);
return ResponseEntity.ok(response);
}
}