Handling Get & POST based response

Overview

The module acts as a liaison between eGov apps and external payment gateways. It facilitates payments, reconciliation of payments, and lookup of transactions 'status'.

Pre-requisites

Before proceeding, make sure the following pre-requisites are met -

  • Knowledge of DIGIT applications is required.

  • Users should be aware of transactional steps in the DIGIT application.

  • Knowledge of JAVA and Spring Boot Framework

Key Functionalities

  • Handling the types of responses that are received by the payment gateway.

  • Once the transaction completed by the user, the Payment gateway will send the status of the transaction.

  • The response will be either in a GET call or POST call

  • Handling GET Response

    • If it is a GET call it will directly redirect to the result page in UI with the transaction status update

  • Handling POST Response

    • If it is an HTTP POST call, we have to provide this endpoint /transaction/v1/_redirect as the redirect URL with a query parameter name as originalreturnurl with value as URL of the result page in UI.

    • In this redirect endpoint, it prepares the GET call with the originalreturnurl value.

    • And endpoint will redirect to the appropriate URL that will handle the transaction status update.

Reference Docs

Doc Links

Title 

Link

Code Repository

https://github.com/egovernments/core-services

Api Handling the response

https://github.com/egovernments/core-services/blob/payment-gateway-uk/egov-pg-service/src/main/java/org/egov/pg/web/controllers/RedirectController.java#L28