Advance payment implementation

Objective

This feature implemented in common pay to provide user options to pay bills or taxes in advance if they wish to do so. Advance payment is configurable in every module.

Technical implementation details

Configuration to allow advance payment is added for every module in mdms.

BusinessService mdms call returns the above configuration. If the advance payment is allowed then user can enter amount more than total due amount.

isAdvanceAllowed check is made in common pay screen. It is being checked for all the modules that uses common pay screen for making payment.

In search screen where we have options to show due amount and make payment also has advance payment implemented. In such case, businessService mdms call has been made. If for any file dues amount is 0 and advance payment is allowed then for such files we are giving pay button to navigate into common pay and make payments.

Advance payment check in common pay screen file link

https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-common-dev/src/ui-config/screens/specs/egov-common/payResource/footer.js

Advance payment for file if due amount is 0

https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-pt-dev/src/ui-config/screens/specs/pt-mutation/publicSearchResource/search-table.js

Business service mdms call file link

https://github.com/egovernments/frontend/blob/master/web/rainmaker/dev-packages/egov-ui-kit-dev/src/utils/commons.js

MDMS call

Below is the mdms call details:

URL: /egov-mdms-service/v1/_search?tenantId=pb

Request header: {"RequestInfo":{"apiId":"Rainmaker","ver":".01","ts":"","action":"_search","did":"1","key":"","msgId":"20170310130900|en_IN","authToken":"b59832b8-965a-47ee-a52b-30fbffd80b13"},"MdmsCriteria":{"tenantId":"pb","moduleDetails":[{"moduleName":"BillingService","masterDetails":[{"name":"BusinessService"}]}]}}

Response:

Localization Implementation

rainmaker-common locale modules has all the locale keys of this module. Any new locale key for common pay screen should go into rainmaker-common locale module.