{"_id":"@egovernments/digit-ui-module-open-payment","_rev":"8-4f7b1a64b313871594be6beb820c7ccd","name":"@egovernments/digit-ui-module-open-payment","dist-tags":{"workbench-1.1":"0.0.2","core-beta-1.9":"0.1.0-rc2","latest":"0.1.0"},"versions":{"0.0.1":{"name":"@egovernments/digit-ui-module-open-payment","version":"0.0.1","keywords":[],"author":{"name":"JaganKumar","email":"jagan.kumar@egov.org.in"},"license":"MIT","_id":"@egovernments/digit-ui-module-open-payment@0.0.1","maintainers":[{"name":"nipunarora-egov","email":"thenipunaroracode@gmail.com"},{"name":"sathishp-egov","email":"sathish.p@egovernments.org"},{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"}],"dist":{"shasum":"30d9fb4d9d9b8a86e2eac4c9926a05d4d0a70435","tarball":"https://registry.npmjs.org/@egovernments/digit-ui-module-open-payment/-/digit-ui-module-open-payment-0.0.1.tgz","fileCount":2,"integrity":"sha512-pG3ibcReq5u/OZKJ/FEE098T7o+hfOsYi3drK5pl9c8gGaLhjiwKdnDxCXB2NUYo0H2wc/vagDc7Hvu3U7MSKA==","signatures":[{"sig":"MEUCIQCqQSfJXM7dts3Md+ZlIADezQMQztYrGEYt7bOnZQ5c/gIgA0ex9uAGMbcwcZSI4aHGPn0v8NzQZGb64OwWh27t5PY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":104834},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/Module.js","scripts":{"build":"microbundle-crl --compress --no-sourcemap --format cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepublish":"yarn build"},"_npmUser":{"name":"nipunarora-egov","email":"thenipunaroracode@gmail.com"},"_npmVersion":"6.14.13","description":"Open Payments","directories":{},"_nodeVersion":"14.17.0","dependencies":{"react":"17.0.2","jquery":"3.6.0","react-dom":"17.0.2","react-query":"3.6.1","react-i18next":"11.16.2","react-router-dom":"5.3.0","@egovernments/digit-ui-components":"0.0.2-beta.1","@egovernments/digit-ui-react-components":"1.8.2-beta.4"},"_hasShrinkwrap":false,"peerDependencies":{"react":"17.0.2","react-router-dom":"5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/digit-ui-module-open-payment_0.0.1_1718711063356_0.31763301002864286","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@egovernments/digit-ui-module-open-payment","version":"0.0.2","keywords":[],"author":{"name":"JaganKumar","email":"jagan.kumar@egov.org.in"},"license":"MIT","_id":"@egovernments/digit-ui-module-open-payment@0.0.2","maintainers":[{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},{"name":"sathishp-egov","email":"sathish.p@egovernments.org"},{"name":"nipunarora-egov","email":"thenipunaroracode@gmail.com"}],"dist":{"shasum":"1289bdf72b2cb1457813a6de1c0a2e7979d6d00d","tarball":"https://registry.npmjs.org/@egovernments/digit-ui-module-open-payment/-/digit-ui-module-open-payment-0.0.2.tgz","fileCount":2,"integrity":"sha512-DQM5syrGmer28TDgjgOlRFb+L6QjH9YUBmbcRK2T34yU0hkxUZuIy7lQA2OxjoKRggcC6Wy5MT+8SFlP/WY94A==","signatures":[{"sig":"MEYCIQC5LmiyzbXxk9qUhQow/j0tevVaeWvAqjl9RdMiDHAEFwIhALGJT9GUiR5Ge42L5Mpx5r8NiAJtaKsPm5XEr0MqD+Lq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104777},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/Module.js","scripts":{"build":"microbundle-crl --compress --no-sourcemap --format cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepublish":"yarn build"},"_npmUser":{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},"_npmVersion":"6.14.15","description":"Open Payments","directories":{},"_nodeVersion":"14.18.1","dependencies":{"react":"17.0.2","jquery":"3.6.0","react-dom":"17.0.2","react-query":"3.6.1","react-i18next":"11.16.2","react-router-dom":"5.3.0","@egovernments/digit-ui-components":"0.2.0","@egovernments/digit-ui-react-components":"1.8.17"},"_hasShrinkwrap":false,"peerDependencies":{"react":"17.0.2","react-router-dom":"5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/digit-ui-module-open-payment_0.0.2_1740112194910_0.7680775435948233","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc1":{"name":"@egovernments/digit-ui-module-open-payment","version":"0.1.0-rc1","keywords":[],"author":{"name":"JaganKumar","email":"jagan.kumar@egov.org.in"},"license":"MIT","_id":"@egovernments/digit-ui-module-open-payment@0.1.0-rc1","maintainers":[{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},{"name":"sathishp-egov","email":"sathish.p@egovernments.org"}],"dist":{"shasum":"0b0da746a2fe11f5a5e611176ca145cd0980dc5c","tarball":"https://registry.npmjs.org/@egovernments/digit-ui-module-open-payment/-/digit-ui-module-open-payment-0.1.0-rc1.tgz","fileCount":4,"integrity":"sha512-KyUlIQmJOq02TF28ULKrT21+NCI7ZU5RY+Zh011BuLUC7kbwIi2CE6AvpmGonWToKVNGptYqfK9oLRy9xhdRdw==","signatures":[{"sig":"MEYCIQC2biji7X15H6Ly3cQWKTORado+ac3lp2HRlqOy9LStrAIhAJxQwXn9jrDeAMsj+c25FBD0XSFmXrCBZSI/+L8xZwCn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129345},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/Module.js","scripts":{"build":"microbundle-crl --compress --no-sourcemap --format cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepublish":"yarn build"},"_npmUser":{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},"_npmVersion":"6.14.18","description":"Open Payments","directories":{},"_nodeVersion":"14.21.3","dependencies":{"react":"17.0.2","jquery":"3.6.0","react-dom":"17.0.2","react-query":"3.6.1","react-i18next":"11.16.2","react-router-dom":"5.3.0","@egovernments/digit-ui-components":"0.2.3","@egovernments/digit-ui-react-components":"1.9.0-rc1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"react":"17.0.2","react-router-dom":"5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/digit-ui-module-open-payment_0.1.0-rc1_1761554462847_0.5372505708212301","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-rc2":{"name":"@egovernments/digit-ui-module-open-payment","version":"0.1.0-rc2","keywords":[],"author":{"name":"JaganKumar","email":"jagan.kumar@egov.org.in"},"license":"MIT","_id":"@egovernments/digit-ui-module-open-payment@0.1.0-rc2","maintainers":[{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},{"name":"sathishp-egov","email":"sathish.p@egovernments.org"}],"dist":{"shasum":"9034d63a3391b15ef0bc740ace4dcb4c0db77e59","tarball":"https://registry.npmjs.org/@egovernments/digit-ui-module-open-payment/-/digit-ui-module-open-payment-0.1.0-rc2.tgz","fileCount":4,"integrity":"sha512-pV4L4Cikc0rHvUrUE66s+9EOanikYbhRaCS1eYyuIAr7YdgfxWgnApXEkYt4ZYaiPDxi2PnurjiSXam6TFPzBA==","signatures":[{"sig":"MEUCIGdUnabBAv5TfzoEMDbzEi2YLfYQ8VCmucVzK5vgjIG6AiEA1qE87ptHIp3kHmtScNW/EY74+hqq+INmAGLreVkSF4g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129477},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/Module.js","scripts":{"build":"microbundle-crl --compress --no-sourcemap --format cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepublish":"yarn build"},"_npmUser":{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},"_npmVersion":"6.14.18","description":"Open Payments","directories":{},"_nodeVersion":"14.21.3","dependencies":{"react":"17.0.2","jquery":"3.6.0","react-dom":"17.0.2","react-query":"3.6.1","react-i18next":"11.16.2","react-router-dom":"5.3.0","@egovernments/digit-ui-components":"0.2.3","@egovernments/digit-ui-react-components":"1.9.0-rc2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"react":"17.0.2","react-router-dom":"5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/digit-ui-module-open-payment_0.1.0-rc2_1761564384809_0.9026708520497466","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@egovernments/digit-ui-module-open-payment","version":"0.1.0","keywords":[],"author":{"name":"JaganKumar","email":"jagan.kumar@egov.org.in"},"license":"MIT","_id":"@egovernments/digit-ui-module-open-payment@0.1.0","maintainers":[{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},{"name":"sathishp-egov","email":"sathish.p@egovernments.org"}],"dist":{"shasum":"25af6bf5aae752fa59cae044a9164daea85462b6","tarball":"https://registry.npmjs.org/@egovernments/digit-ui-module-open-payment/-/digit-ui-module-open-payment-0.1.0.tgz","fileCount":4,"integrity":"sha512-xiJ1YelTLpBMpSLPCnnlNQa1DppE8kfUKgTM15BCBS/yunHQlfXiwZr/cMFFU7IZCGgJQnlZlfBIeA2cOmCD1Q==","signatures":[{"sig":"MEUCIQC8mCUnOxJbAj0eZWX82/Yn5j5/giXNIVR/9cMUljKOkAIgSFAN8AR6sSt4+kWe6o6gAXPKHUfpm69wB3nv7LW+bXw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129469},"main":"dist/index.js","module":"dist/index.modern.js","source":"src/Module.js","scripts":{"build":"microbundle-crl --compress --no-sourcemap --format cjs","start":"microbundle-crl watch --no-compress --format modern,cjs","prepublish":"yarn build"},"_npmUser":{"name":"jagankumar-egov","email":"jagan.kumar@egov.org.in"},"_npmVersion":"6.14.18","description":"Open Payments","directories":{},"_nodeVersion":"14.21.3","dependencies":{"react":"17.0.2","jquery":"3.6.0","react-dom":"17.0.2","react-query":"3.6.1","react-i18next":"11.16.2","react-router-dom":"5.3.0","@egovernments/digit-ui-components":"0.2.3","@egovernments/digit-ui-react-components":"1.9.0"},"_hasShrinkwrap":false,"peerDependencies":{"react":"17.0.2","react-router-dom":"5.3.0"},"_npmOperationalInternal":{"tmp":"tmp/digit-ui-module-open-payment_0.1.0_1761624970332_0.8425493997671865","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-06-18T11:44:23.264Z","modified":"2026-05-22T06:38:00.423Z","0.0.1":"2024-06-18T11:44:23.560Z","0.0.2":"2025-02-21T04:29:55.132Z","0.1.0-rc1":"2025-10-27T08:41:03.012Z","0.1.0-rc2":"2025-10-27T11:26:24.976Z","0.1.0":"2025-10-28T04:16:10.513Z"},"author":{"name":"JaganKumar","email":"jagan.kumar@egov.org.in"},"license":"MIT","keywords":[],"description":"Open Payments","maintainers":[{"email":"jagan.kumar@egov.org.in","name":"jagankumar-egov"},{"email":"sathish.p@egovernments.org","name":"sathishp-egov"}],"readme":"# @egovernments/digit-ui-module-open-payment\n\n## Version: 0.1.0 🎉 NEW MODULE\n**Release Date:** October 23, 2025\n\n## 📦 Installation\n\n```bash\nnpm install --save @egovernments/digit-ui-module-open-payment@0.1.0\n```\n\n## 🎉 What's New - Complete Payment Gateway System\n\n### 🏗️ Brand New Module\nThis is a **completely new module** providing a comprehensive payment gateway system for DIGIT platform with support for external payment processors and multi-tenant payment handling.\n\n### 🚀 Major Features\n- **💳 Core Payment Components**: OpenSearch, OpenView, Response handling\n- **🔗 PayGov Integration**: External payment gateway support with secure handling\n- **⚙️ Advanced Configuration**: Comprehensive search and payment configurations\n- **🏢 Multi-Tenant Support**: Full tenant-specific payment processing\n- **🔐 Secure Processing**: Cross-origin handling and security compliance\n\n## 📋 Core Features\n\n### 💳 Payment Components\n1. **OpenSearch Component**\n   - Advanced payment search functionality\n   - Dynamic tenant selection with MDMS integration\n   - Connection ID based search with billing service integration\n   - Configurable search forms with validation\n   - Enhanced error handling and user feedback\n\n2. **OpenView Component**\n   - Comprehensive payment view interface\n   - Detailed payment information display\n   - Status tracking and history visualization\n   - Enhanced user experience for payment details\n\n3. **Response Component**\n   - Payment response handling for success/failure scenarios\n   - Better user feedback and next steps guidance\n   - Enhanced error reporting and troubleshooting\n   - Redirect handling for external gateways\n\n### ⚙️ Configuration System\n4. **OpenSearchConfig**\n   - Billing service integration (`/billing-service/bill/v2/_fetchbill`)\n   - Configurable search parameters and validation\n   - MDMS-based dropdown options for tenant selection\n   - Flexible form field configuration with localization support\n   - Advanced search criteria with connection ID lookup\n\n5. **UICustomizations**\n   - Tailored user interface for payment workflows\n   - Enhanced component styling and behavior\n   - Custom validation and interaction patterns\n\n### 🔧 Payment Utilities & Integration\n6. **PayGov Integration**\n   - `makePayment` function for external payment gateway integration\n   - Cross-origin request handling with proper headers\n   - No-cors mode support for payment gateway compatibility\n   - Enhanced error handling and response management\n\n7. **Hooks Integration**\n   - Custom hooks for payment operations\n   - Better state management for payment flows\n   - Enhanced data fetching and caching\n   - Improved error handling and loading states\n\n### 👤 Citizen Portal\n8. **Citizen Interface**\n   - Complete citizen-facing payment interface\n   - Enhanced user experience for citizen payments\n   - Better mobile responsiveness and accessibility\n   - Streamlined payment workflows and navigation\n\n## 🔧 Configuration System\n\nThe Open Payment module supports a comprehensive configuration system with multiple configuration types for payment gateway integration and transaction management.\n\n### 1. Global Configuration (globalConfigs.getConfig)\n\nGlobal configurations that affect the entire open payment module behavior:\n\n| Config Key | Type | Default | Description | Usage |\n|------------|------|---------|-------------|--------|\n| `OVERRIDE_ROOT_TENANT_WITH_LOGGEDIN_TENANT` | Boolean | `false` | Multi-tenant support for payment operations | Tenant context switching in payments |\n| `MULTI_ROOT_TENANT` | Boolean | `false` | Enables multi-root tenant support | Enhanced tenant payment management |\n| `PAYMENT_GATEWAY_URL` | String | - | External payment gateway URL | PayGov and other gateway integration |\n| `BILLING_SERVICE_URL` | String | - | Billing service endpoint | Payment search and bill fetching |\n| `PAYMENT_TIMEOUT` | Number | `30000` | Payment gateway timeout in ms | Transaction timeout handling |\n| `PAYMENT_RETRY_COUNT` | Number | `3` | Maximum retry attempts for failed payments | Error handling |\n| `PAYMENT_ENCRYPTION_ENABLED` | Boolean | `true` | Enable payment data encryption | Security compliance |\n\n```javascript\n// Global Configuration Example\nconst getConfig = (key) => {\n  switch(key) {\n    case 'OVERRIDE_ROOT_TENANT_WITH_LOGGEDIN_TENANT':\n      return true; // Enable multi-tenant payments\n    case 'MULTI_ROOT_TENANT':\n      return true; // Enable multi-root tenant support\n    case 'PAYMENT_GATEWAY_URL':\n      return 'https://paygov.example.com'; // Set payment gateway URL\n    case 'BILLING_SERVICE_URL':\n      return '/billing-service'; // Set billing service endpoint\n    case 'PAYMENT_TIMEOUT':\n      return 60000; // Set timeout to 60 seconds\n    case 'PAYMENT_RETRY_COUNT':\n      return 5; // Allow 5 retry attempts\n    case 'PAYMENT_ENCRYPTION_ENABLED':\n      return true; // Enable encryption\n    default:\n      return undefined;\n  }\n};\n```\n\n### 2. Component Props Configuration\n\nDirect configuration passed as props to payment components:\n\n```javascript\n// OpenSearch Component Configuration\n<OpenSearch\n  config={{\n    searchCriteria: [\"connectionId\", \"billNumber\", \"consumerCode\"],\n    tenantFilter: true,\n    dateRangeFilter: true,\n    statusFilter: [\"pending\", \"paid\", \"failed\"],\n    maxResults: 100,\n    enableExport: true\n  }}\n  onSearch={handlePaymentSearch}\n  tenantId=\"pg.citya\"\n/>\n\n// OpenView Component Configuration\n<OpenView\n  config={{\n    showPaymentHistory: true,\n    showReceiptDownload: true,\n    showPrintOption: true,\n    enablePartialPayment: false,\n    paymentMethods: [\"gateway\", \"cash\", \"cheque\"],\n    receiptFormat: \"standard\"\n  }}\n  paymentData={paymentDetails}\n  onAction={handlePaymentAction}\n/>\n\n// Response Component Configuration\n<Response\n  config={{\n    redirectTimeout: 5000,\n    showTransactionDetails: true,\n    enableRetry: true,\n    showReceiptPreview: true,\n    autoRedirectOnSuccess: true,\n    errorRetryLimit: 3\n  }}\n  transactionId=\"TXN123456\"\n  status=\"success\"\n/>\n```\n\n### 3. MDMS Configuration\n\nConfiguration stored in MDMS for dynamic payment behavior:\n\n```json\n{\n  \"tenantId\": \"pg\",\n  \"moduleName\": \"open-payment-config\",\n  \"PaymentConfig\": [\n    {\n      \"module\": \"PaymentGateway\",\n      \"config\": {\n        \"supportedGateways\": [\n          {\n            \"code\": \"paygov\",\n            \"name\": \"PayGov\",\n            \"url\": \"https://paygov.treasury.gov\",\n            \"timeout\": 30000,\n            \"retryCount\": 3\n          },\n          {\n            \"code\": \"razorpay\",\n            \"name\": \"Razorpay\",\n            \"url\": \"https://api.razorpay.com\",\n            \"timeout\": 45000,\n            \"retryCount\": 2\n          }\n        ],\n        \"defaultGateway\": \"paygov\",\n        \"encryptionRequired\": true\n      }\n    },\n    {\n      \"module\": \"BillingIntegration\",\n      \"config\": {\n        \"billingServiceUrl\": \"/billing-service/bill/v2/_fetchbill\",\n        \"searchCriteria\": {\n          \"connectionId\": {\n            \"mandatory\": true,\n            \"validation\": \"^[A-Z0-9]+$\"\n          },\n          \"billNumber\": {\n            \"mandatory\": false,\n            \"validation\": \"^[0-9]+$\"\n          }\n        },\n        \"resultLimit\": 50\n      }\n    },\n    {\n      \"module\": \"TransactionManagement\",\n      \"config\": {\n        \"transactionStates\": [\"initiated\", \"processing\", \"success\", \"failed\", \"cancelled\"],\n        \"timeoutDuration\": 300000,\n        \"receiptGeneration\": {\n          \"autoGenerate\": true,\n          \"format\": \"pdf\",\n          \"template\": \"standard\"\n        }\n      }\n    }\n  ]\n}\n```\n\n### 4. UI Customizations (Digit.Customizations)\n\nCustomizations for payment components and workflows:\n\n```javascript\n// Open Payment Module Customizations\nDigit.Customizations = {\n  \"open-payment\": {\n    \"OpenSearch\": {\n      \"searchForm\": {\n        \"fields\": [\n          {\n            \"key\": \"connectionId\",\n            \"label\": \"Connection ID\",\n            \"type\": \"text\",\n            \"validation\": [\"required\", \"alphanumeric\"],\n            \"placeholder\": \"Enter Connection ID\"\n          },\n          {\n            \"key\": \"billNumber\",\n            \"label\": \"Bill Number\",\n            \"type\": \"text\",\n            \"validation\": [\"numeric\"],\n            \"placeholder\": \"Enter Bill Number\"\n          },\n          {\n            \"key\": \"dateRange\",\n            \"label\": \"Bill Date Range\",\n            \"type\": \"daterange\",\n            \"validation\": [\"dateRange\"]\n          }\n        ],\n        \"submitButton\": {\n          \"text\": \"Search Bills\",\n          \"loading\": \"Searching...\",\n          \"disabled\": false\n        }\n      },\n      \"resultTable\": {\n        \"columns\": [\n          {\n            \"key\": \"billNumber\",\n            \"label\": \"Bill Number\",\n            \"sortable\": true,\n            \"searchable\": true\n          },\n          {\n            \"key\": \"amount\",\n            \"label\": \"Amount\",\n            \"formatter\": \"currency\",\n            \"sortable\": true\n          },\n          {\n            \"key\": \"dueDate\",\n            \"label\": \"Due Date\",\n            \"formatter\": \"date\",\n            \"sortable\": true\n          },\n          {\n            \"key\": \"status\",\n            \"label\": \"Status\",\n            \"formatter\": \"status\"\n          }\n        ],\n        \"actions\": [\n          {\n            \"key\": \"pay\",\n            \"label\": \"Pay Now\",\n            \"icon\": \"payment\",\n            \"primary\": true\n          },\n          {\n            \"key\": \"view\",\n            \"label\": \"View Details\",\n            \"icon\": \"view\"\n          }\n        ]\n      }\n    },\n    \"PaymentGateway\": {\n      \"gatewaySelection\": {\n        \"showGatewayLogos\": true,\n        \"allowGatewaySwitch\": true,\n        \"defaultGateway\": \"paygov\",\n        \"gatewayFeatures\": {\n          \"paygov\": {\n            \"name\": \"Pay.gov\",\n            \"logo\": \"/assets/paygov-logo.png\",\n            \"features\": [\"secure\", \"government\", \"instant\"]\n          },\n          \"razorpay\": {\n            \"name\": \"Razorpay\",\n            \"logo\": \"/assets/razorpay-logo.png\",\n            \"features\": [\"multiple_methods\", \"fast\", \"reliable\"]\n          }\n        }\n      },\n      \"paymentForm\": {\n        \"fields\": [\n          {\n            \"key\": \"amount\",\n            \"label\": \"Payment Amount\",\n            \"type\": \"currency\",\n            \"readonly\": true\n          },\n          {\n            \"key\": \"paymentMethod\",\n            \"label\": \"Payment Method\",\n            \"type\": \"select\",\n            \"options\": [\"card\", \"netbanking\", \"upi\", \"wallet\"]\n          }\n        ],\n        \"securityFeatures\": {\n          \"showSecurityBadges\": true,\n          \"encryptionNotice\": true,\n          \"sslIndicator\": true\n        }\n      }\n    },\n    \"PaymentResponse\": {\n      \"successPage\": {\n        \"showReceiptPreview\": true,\n        \"downloadOptions\": [\"pdf\", \"email\"],\n        \"redirectOptions\": {\n          \"autoRedirect\": true,\n          \"redirectDelay\": 5000,\n          \"showCountdown\": true\n        },\n        \"socialSharing\": {\n          \"enabled\": false,\n          \"platforms\": [\"email\", \"sms\"]\n        }\n      },\n      \"failurePage\": {\n        \"showErrorDetails\": true,\n        \"retryOptions\": {\n          \"enableRetry\": true,\n          \"maxRetries\": 3,\n          \"retryMethods\": [\"same_gateway\", \"different_gateway\"]\n        },\n        \"supportContact\": {\n          \"showHelpdesk\": true,\n          \"phone\": \"1800-XXX-XXXX\",\n          \"email\": \"support@example.com\"\n        }\n      }\n    },\n    \"TransactionTracking\": {\n      \"trackingDisplay\": {\n        \"showTimeline\": true,\n        \"showStatusUpdates\": true,\n        \"enableNotifications\": true,\n        \"updateInterval\": 30000\n      },\n      \"transactionDetails\": {\n        \"showTransactionId\": true,\n        \"showTimestamp\": true,\n        \"showGatewayReference\": true,\n        \"showPaymentMethod\": true\n      }\n    }\n  }\n};\n```\n\n## 💻 Usage\n\n### Basic Setup\n\nAdd the dependency to your `package.json`:\n\n```json\n{\n  \"@egovernments/digit-ui-module-open-payment\": \"^0.1.0\"\n}\n```\n\n### In your App.js\n\n```jsx\nimport { initOpenPaymentComponents } from \"@egovernments/digit-ui-module-open-payment\";\n\n// Enable open payment module\nconst enabledModules = [\"open-payment\"];\n\n// Initialize open payment components\nconst initDigitUI = () => {\n  initOpenPaymentComponents();\n};\n```\n\n### Using Payment Components\n\n```jsx\n// Payment Search Component\nimport { OpenSearch } from \"@egovernments/digit-ui-module-open-payment\";\n\n<OpenSearch\n  onSearch={handlePaymentSearch}\n  tenantId=\"pg.citya\"\n  config={searchConfig}\n/>\n\n// Payment View Component\nimport { OpenView } from \"@egovernments/digit-ui-module-open-payment\";\n\n<OpenView\n  paymentData={paymentDetails}\n  onAction={handlePaymentAction}\n  showHistory={true}\n/>\n\n// Payment Response Handler\nimport { Response } from \"@egovernments/digit-ui-module-open-payment\";\n\n<Response\n  transactionId=\"TXN123456\"\n  status=\"success\"\n  onContinue={handleContinue}\n/>\n```\n\n### Using PayGov Integration\n\n```jsx\nimport { makePayment } from \"@egovernments/digit-ui-module-open-payment\";\n\n// External payment processing\nconst processPayment = async (paymentData) => {\n  try {\n    await makePayment(\n      'https://paygov.example.com/process',\n      paymentData\n    );\n  } catch (error) {\n    console.error('Payment failed:', error);\n  }\n};\n```\n\n### MDMS Configuration\n\nEnable open payment in MDMS by adding this configuration:\n\n```json\n{\n  \"module\": \"open-payment\",\n  \"code\": \"open-payment\",\n  \"active\": true,\n  \"order\": 1,\n  \"tenants\": [\n    {\n      \"code\": \"your-tenant-code\"\n    }\n  ]\n}\n```\n\n## 🏗️ Architecture & Components\n\n### 📄 Configuration Files\n- **OpenSearchConfig.js**: Comprehensive search configuration with billing service integration\n- **UICustomizations.js**: Custom UI behavior and styling for payment workflows\n\n### 🛠️ Utility Systems\n- **payGov.js**: PayGov integration utilities for external payment processing\n- **index.js**: Centralized utility exports and payment helpers\n\n### 🔄 Page Structure\n- **Citizen Index**: Complete citizen-facing payment interface\n- **Employee Interface**: Administrative payment management tools\n\n## 🎯 Key Capabilities\n\n### 💳 Payment Gateway Features\n- **External Gateway Support**: PayGov integration for government payments\n- **Secure Processing**: Proper headers and cross-origin handling\n- **Multiple Gateways**: Support for various payment processors\n- **Transaction Tracking**: Complete payment lifecycle management\n\n### 🔍 Payment Search & Management\n- **Advanced Search**: Connection ID based payment lookup\n- **Tenant-Specific**: Filtering based on tenant context\n- **Bill Integration**: Direct integration with billing service\n- **History Tracking**: Complete payment history and audit trails\n\n### 🏢 Multi-Tenant Support\n- **Tenant Isolation**: Proper separation of payment data\n- **Configuration Management**: Tenant-specific payment settings\n- **Gateway Selection**: Different gateways per tenant\n- **Compliance**: Tenant-specific compliance requirements\n\n### 🔐 Security & Compliance\n- **Secure Headers**: Proper security headers for payment processing\n- **Data Protection**: Encrypted payment data handling\n- **Compliance**: PCI DSS and government payment standards\n- **Audit Trails**: Complete audit logs for payment transactions\n\n## 🎨 User Interface\n\n### 🖥️ Responsive Design\n- **Mobile-First**: Optimized for mobile payment flows\n- **Touch Friendly**: Enhanced touch interactions for payments\n- **Accessibility**: WCAG compliant payment forms\n- **Cross-Browser**: Tested across major browsers\n\n### 🎯 User Experience\n- **Simplified Flow**: Streamlined payment process\n- **Clear Feedback**: Real-time status updates\n- **Error Handling**: User-friendly error messages\n- **Progress Tracking**: Visual payment progress indicators\n\n## 🔄 Payment Flow\n\n### Citizen Payment Flow\n1. **Search**: Find bills/payments using connection ID\n2. **Select**: Choose payments to process\n3. **Gateway**: Redirect to external payment gateway\n4. **Process**: Complete payment on gateway\n5. **Response**: Handle success/failure response\n6. **Confirmation**: Display payment confirmation\n\n### Administrative Flow\n1. **Monitor**: Track payment transactions\n2. **Reconcile**: Match payments with bills\n3. **Report**: Generate payment reports\n4. **Audit**: Review payment audit trails\n\n## 🧪 Testing\n\n### Payment Testing\n```javascript\n// Enable payment testing features\nwindow.globalConfigs.getConfig = (key) => {\n  if (key === 'OVERRIDE_ROOT_TENANT_WITH_LOGGEDIN_TENANT') return true;\n  if (key === 'PAYMENT_GATEWAY_URL') return 'https://test-gateway.com';\n};\n```\n\n### Feature Testing Checklist\n- [ ] Payment search functionality works\n- [ ] Tenant selection and filtering\n- [ ] External gateway integration\n- [ ] Payment response handling\n- [ ] Multi-tenant payment processing\n- [ ] Mobile payment flow\n\n## 🔗 Dependencies\n\n### Required Dependencies\n- `@egovernments/digit-ui-react-components`: ^1.8.0\n- `@egovernments/digit-ui-components`: ^1.0.0\n- `react`: ^17.0.2\n- `react-dom`: ^17.0.2\n\n### External Integrations\n- **Billing Service**: For payment search and bill fetching\n- **Payment Gateways**: PayGov and other external processors\n- **MDMS**: For tenant and configuration management\n\n## 🔧 Payment Gateway Integration\n\n### PayGov Integration\n```javascript\nimport { makePayment } from \"@egovernments/digit-ui-module-open-payment\";\n\nconst paymentData = new FormData();\npaymentData.append('amount', '1000.00');\npaymentData.append('currency', 'USD');\npaymentData.append('reference', 'REF123');\n\nawait makePayment(\n  'https://paygov.treasury.gov/process',\n  paymentData\n);\n```\n\n### Custom Gateway Integration\n```javascript\n// Extend for other gateways\nconst customGatewayPayment = async (gatewayUrl, paymentData) => {\n  const response = await fetch(gatewayUrl, {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': 'Bearer token'\n    },\n    body: JSON.stringify(paymentData)\n  });\n  return response.json();\n};\n```\n\n## 🐛 Known Issues & Solutions\n\n### Common Issues\n1. **CORS Errors**: Ensure proper CORS configuration for payment gateways\n2. **Gateway Timeout**: Implement proper timeout handling\n3. **Payment Failures**: Proper error handling and retry mechanisms\n4. **Mobile Issues**: Test payment flows on mobile devices\n\n## 📊 Performance & Security\n\n### Performance\n- **Fast Search**: Optimized payment search queries\n- **Efficient Loading**: Lazy loading of payment data\n- **Caching**: Intelligent caching of payment information\n- **Bundle Size**: Optimized bundle for production\n\n### Security\n- **PCI Compliance**: Follows PCI DSS standards\n- **Data Encryption**: Encrypted payment data transmission\n- **Secure Headers**: Proper security headers\n- **Audit Logging**: Complete audit trails\n\n## 🤝 Contributors\n\n- [jagankumar-egov](https://github.com/jagankumar-egov)\n\n## 📚 Documentation\n\n- [Developer Guide](https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui)\n- [Payment Gateway Guide](https://core.digit.org/guides/developer-guide/payment-gateway-integration)\n- [API Documentation](https://core.digit.org/platform/core-services/billing-service)\n\n## 🔧 Maintainer\n\n- [jagankumar-egov](https://www.github.com/jagankumar-egov)\n\n## 📄 License\n\nMIT\n\n---\n\n### Published from DIGIT Frontend\n[DIGIT Frontend Repository](https://github.com/egovernments/DIGIT-Frontend/tree/develop)\n\n![DIGIT Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png)","readmeFilename":"README.md"}