elpaypg 0.0.0-stage → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/.env.example +8 -0
  2. package/README.md +176 -2
  3. package/package.json +21 -4
  4. package/public/elpay-checkout.js +769 -0
  5. package/public/elpay-sms-gateway.apk +0 -0
  6. package/public/elpay-sms-gateway.apk.sha256 +1 -0
  7. package/public/elpay.js +785 -0
  8. package/public/fonts/dm-sans.woff2 +0 -0
  9. package/public/fonts/sora.woff2 +0 -0
  10. package/public/views/checkout.html +2839 -0
  11. package/public/views/partials/auth.html +110 -0
  12. package/public/views/partials/footer.html +54 -0
  13. package/public/views/partials/header.html +101 -0
  14. package/public/views/partials/modals.html +179 -0
  15. package/public/views/partials/payment-methods.html +526 -0
  16. package/public/views/partials/sidebar.html +75 -0
  17. package/public/views/partials/splash.html +35 -0
  18. package/src/__tests__/smoke.test.js +8 -0
  19. package/src/auth-guard.js +95 -0
  20. package/src/index.js +137 -0
  21. package/src/router.js +46 -0
  22. package/src/routes/admin.routes.js +2421 -0
  23. package/src/routes/checkout.routes.js +2000 -0
  24. package/src/routes/customer.routes.js +650 -0
  25. package/src/routes/device.routes.js +303 -0
  26. package/src/routes/payments.routes.js +446 -0
  27. package/src/routes/pollers.routes.js +653 -0
  28. package/src/services/observer-poller.service.js +369 -0
  29. package/src/services/tunnel-manager.js +130 -0
  30. package/src/services/whatsapp-berry.service.js +743 -0
  31. package/src/vendor/common/__tests__/common.test.js +297 -0
  32. package/src/vendor/common/__tests__/common.test.ts +160 -0
  33. package/src/vendor/common/contracts.js +64 -0
  34. package/src/vendor/common/contracts.ts +188 -0
  35. package/src/vendor/common/crypto.js +132 -0
  36. package/src/vendor/common/crypto.ts +112 -0
  37. package/src/vendor/common/enums.js +91 -0
  38. package/src/vendor/common/enums.ts +91 -0
  39. package/src/vendor/common/index.js +12 -0
  40. package/src/vendor/common/index.ts +8 -0
  41. package/src/vendor/common/money.js +62 -0
  42. package/src/vendor/common/money.ts +56 -0
  43. package/src/vendor/common/observation.js +27 -0
  44. package/src/vendor/common/observation.ts +52 -0
  45. package/src/vendor/common/runtime-config.js +246 -0
  46. package/src/vendor/common/secrets.js +374 -0
  47. package/src/vendor/common/state-machine.d.ts +1 -0
  48. package/src/vendor/common/state-machine.js +1 -0
  49. package/src/vendor/common/state-transitions.js +85 -0
  50. package/src/vendor/common/tunnel-command.js +59 -0
  51. package/src/vendor/common/upi-providers.js +389 -0
  52. package/src/vendor/common/upi-providers.ts +400 -0
  53. package/src/vendor/common/upi.js +69 -0
  54. package/src/vendor/common/upi.ts +61 -0
  55. package/src/vendor/core/__tests__/core.test.js +683 -0
  56. package/src/vendor/core/__tests__/queue-timing.test.js +237 -0
  57. package/src/vendor/core/__tests__/webhook-engine.test.js +243 -0
  58. package/src/vendor/core/attribution-engine.js +855 -0
  59. package/src/vendor/core/bank-email-parser.js +105 -0
  60. package/src/vendor/core/bank-sms-parser.js +183 -0
  61. package/src/vendor/core/device-security.js +506 -0
  62. package/src/vendor/core/index.js +13 -0
  63. package/src/vendor/core/normalizer.js +165 -0
  64. package/src/vendor/core/qr-lib.js +8 -0
  65. package/src/vendor/core/qr.js +62 -0
  66. package/src/vendor/core/queue-engine.js +153 -0
  67. package/src/vendor/core/recovery-engine.js +159 -0
  68. package/src/vendor/core/state-machine.js +42 -0
  69. package/src/vendor/core/timing-engine.js +272 -0
  70. package/src/vendor/core/verification-pipeline.js +1164 -0
  71. package/src/vendor/core/webhook-engine.js +280 -0
  72. package/src/vendor/db/__tests__/auth-matrix.test.js +564 -0
  73. package/src/vendor/db/__tests__/customer-reset.test.js +95 -0
  74. package/src/vendor/db/__tests__/db.test.js +265 -0
  75. package/src/vendor/db/__tests__/schema-parity.test.js +137 -0
  76. package/src/vendor/db/__tests__/sqlite_verify.test.js +15 -0
  77. package/src/vendor/db/database.js +181 -0
  78. package/src/vendor/db/index.js +12 -0
  79. package/src/vendor/db/migrate.js +210 -0
  80. package/src/vendor/db/repositories/audit-log.repository.js +68 -0
  81. package/src/vendor/db/repositories/customer-session.repository.js +181 -0
  82. package/src/vendor/db/repositories/customer.repository.js +636 -0
  83. package/src/vendor/db/repositories/device.repository.js +285 -0
  84. package/src/vendor/db/repositories/merchant.repository.js +158 -0
  85. package/src/vendor/db/repositories/observation.repository.js +124 -0
  86. package/src/vendor/db/repositories/payment-session.repository.js +618 -0
  87. package/src/vendor/db/repositories/receiving-account.repository.js +244 -0
  88. package/src/vendor/db/repositories/support-ticket.repository.js +140 -0
  89. package/src/vendor/db/schema.sql +266 -0
  90. package/src/vendor/db/sqlite-schema.sql +270 -0
@@ -0,0 +1,389 @@
1
+ /**
2
+ * Central registry of 30 official UPI application providers.
3
+ * Real official Google Play Store listing CDN icons and official brand assets.
4
+ */
5
+ export const UPI_PROVIDERS = [
6
+ {
7
+ id: 'google-pay',
8
+ name: 'Google Pay',
9
+ shortName: 'GPay',
10
+ packageName: 'com.google.android.apps.nbu.paisa.user',
11
+ iconUrl: 'https://play-lh.googleusercontent.com/Wbik2RoUSGgWEg8ybAhFaMJO2fE7x9gqCXfwbmW0YPjh6TKcjKzecth8GaYkbUBYtLZXhyfVMpqkIuJgTM8p=s180-rw',
12
+ brandColor: '#1a73e8',
13
+ searchKeywords: ['google', 'gpay', 'pay', 'googlepay'],
14
+ enabled: true,
15
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M43.6 20.1H42V20H24v8h11.3C33.7 32.7 29.3 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.1 8 3l6-6C34.4 5.5 29.5 3.5 24 3.5 12.7 3.5 3.5 12.7 3.5 24S12.7 44.5 24 44.5c11 0 20-8 20-20 0-1.5-.2-2.9-.4-4.4z" fill="#4285F4"/><path d="M6.3 14.7l6.6 4.8C14.7 15.6 19 12.5 24 12.5c3.1 0 5.8 1.1 8 3l6-6C34.4 5.5 29.5 3.5 24 3.5c-7.7 0-14.4 4.3-17.7 11.2z" fill="#EA4335"/><path d="M24 44.5c5.3 0 10.2-1.9 13.9-5.1l-6.4-5.2c-2.1 1.4-4.6 2.3-7.5 2.3-5.3 0-9.7-3.3-11.3-8l-6.6 5.1C9.3 40.4 16.1 44.5 24 44.5z" fill="#34A853"/><path d="M43.6 20.1H42V20H24v8h11.3c-.8 2.3-2.2 4.3-4 5.7l6.4 5.2c4.3-4 6.8-9.8 6.8-14.9 0-1.5-.2-2.9-.5-3.9z" fill="#FBBC05"/></svg>'
16
+ },
17
+ {
18
+ id: 'phonepe',
19
+ name: 'PhonePe',
20
+ shortName: 'PhonePe',
21
+ packageName: 'com.phonepe.app',
22
+ iconUrl: 'https://play-lh.googleusercontent.com/ARGoCZk-5QCKPpyTsGhn1WahhPbVMa95T1U7clwnI8gjtW-YNY96rAANqFkuENbU35IbYF2Gjg2UjZXA495x0A=s180-rw',
23
+ brandColor: '#5f259f',
24
+ searchKeywords: ['phonepe', 'phone', 'pe'],
25
+ enabled: true,
26
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#5f259f"/><path d="M28.5 21.5h-5.2v-2.8c0-.7.6-1.3 1.3-1.3h3.9c.6 0 1-.4 1-1s-.4-1-1-1h-3.9c-1.8 0-3.3 1.5-3.3 3.3v2.8H18c-.6 0-1 .4-1 1s.4 1 1 1h3.3v13c0 .6.4 1 1 1s1-.4 1-1V23.5h5.2c3.2 0 5.8-2.6 5.8-5.8s-2.6-5.8-5.8-5.8h-1.5c-.6 0-1 .4-1 1s.4 1 1 1h1.5c2.1 0 3.8 1.7 3.8 3.8s-1.7 3.8-3.8 3.8z" fill="#fff"/></svg>'
27
+ },
28
+ {
29
+ id: 'paytm',
30
+ name: 'Paytm',
31
+ shortName: 'Paytm',
32
+ packageName: 'net.one97.paytm',
33
+ iconUrl: 'https://play-lh.googleusercontent.com/WDGsMRuVENnZPEpV4DEaXw12qtMY3em85xpmZqcXzeh0iT_eXFtAU9VUj-Z7xNQQd5DMqrkKSs9D0qbI1rlt=s180-rw',
34
+ brandColor: '#00b9f5',
35
+ searchKeywords: ['paytm', 'pay', 'wallet'],
36
+ enabled: true,
37
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#002e6e"/><path d="M12 28V16h4.5c2.8 0 4.8 1.8 4.8 4.5s-2 4.5-4.8 4.5H15V28h-3zm3-6h1.5c1.1 0 1.8-.7 1.8-1.5s-.7-1.5-1.8-1.5H15V22z" fill="#00b9f5"/><path d="M22 28V16h3v12h-3z" fill="#00b9f5"/><path d="M26 28l4-8-4-4h3.5l2.2 4.8 2.2-4.8h3.5l-4 4 4 8h-3.5L32 23.5 30 28H26z" fill="#00b9f5"/></svg>'
38
+ },
39
+ {
40
+ id: 'bhim',
41
+ name: 'BHIM',
42
+ shortName: 'BHIM',
43
+ packageName: 'in.org.npci.upiapp',
44
+ iconUrl: 'https://play-lh.googleusercontent.com/rPJLwugORRZudZYpG6HrP2ejHgdinQzqkKgdPvsoCM5jc_7d507xaYCVUWELWOTu2OEEdwtZNJ7ySq5Mpj2S7DQ=s180-rw',
45
+ brandColor: '#00796b',
46
+ searchKeywords: ['bhim', 'npci', 'upi'],
47
+ enabled: true,
48
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#00796b"/><path d="M14 12h8c3.3 0 6 2.7 6 6 0 1.9-.9 3.6-2.3 4.7 2 .9 3.3 2.9 3.3 5.3 0 3.3-2.7 6-6 6h-9V12zm4 4v5h4c1.1 0 2-.9 2-2s-.9-2-2-2h-4zm0 9v5h5c1.1 0 2-.9 2-2s-.9-2-2-2h-5z" fill="#fff"/><path d="M30 12l6 12-6 12h4l6-12-6-12h-4z" fill="#f57c00"/></svg>'
49
+ },
50
+ {
51
+ id: 'amazon-pay',
52
+ name: 'Amazon Pay',
53
+ shortName: 'Amazon Pay',
54
+ packageName: 'in.amazon.mShop.android.shopping',
55
+ iconUrl: 'https://play-lh.googleusercontent.com/E2Nyw1kSrYFvi5DFOznWOR2iXY9mwxwfYHXV37aLHmuKtEW3gs7StIvVptoV2x8_ykiHQQmliwpfDsFm0Quuwbk=s180-rw',
56
+ brandColor: '#232f3e',
57
+ searchKeywords: ['amazon', 'amazonpay', 'pay'],
58
+ enabled: true,
59
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#232f3e"/><path d="M12 28c8 5 18 5 24 0" stroke="#ff9900" stroke-width="3" stroke-linecap="round"/><path d="M34 26l3 2-2 3" stroke="#ff9900" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M21 16c-3 0-5 2-5 5s2 5 5 5 5-2 5-5-2-5-5-5zm0 2.5c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5-2.5-1.1-2.5-2.5 1.1-2.5 2.5-2.5z" fill="#fff"/></svg>'
60
+ },
61
+ {
62
+ id: 'cred',
63
+ name: 'CRED',
64
+ shortName: 'CRED',
65
+ packageName: 'com.dreamplug.androidapp',
66
+ iconUrl: 'https://play-lh.googleusercontent.com/PJvM1900ufKia-hc7l7eaU0quGrOm_sx1x_szS_-lA7kRm9sb7gr1cgI8uQMH7tq3n-vnx0SkIUZa19fwz2G=s180-rw',
67
+ brandColor: '#121212',
68
+ searchKeywords: ['cred', 'upi', 'rewards'],
69
+ enabled: true,
70
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#121212"/><path d="M14 14h20v20H14V14z" stroke="#fff" stroke-width="3" fill="none"/><path d="M18 18h12v12H18V18z" fill="#fff"/></svg>'
71
+ },
72
+ {
73
+ id: 'imobile-pay',
74
+ name: 'iMobile Pay',
75
+ shortName: 'iMobile',
76
+ packageName: 'com.csam.icici.bank.imobile',
77
+ iconUrl: 'https://play-lh.googleusercontent.com/dmco3u7SKC9ldQVrGknBkeNeaMUVYAcWzo1hNtb4AbxIcR_EP-0drTWvDhi3C_wC7ul5oynYpKJBVZhKr4GCAA=s180-rw',
78
+ brandColor: '#b02a30',
79
+ searchKeywords: ['icici', 'imobile', 'bank'],
80
+ enabled: true,
81
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#b02a30"/><path d="M16 14h6v20h-6V14zm10 0h6v20h-6V14z" fill="#fff"/><circle cx="19" cy="10" r="2" fill="#f37021"/></svg>'
82
+ },
83
+ {
84
+ id: 'sbi-pay',
85
+ name: 'SBI Pay',
86
+ shortName: 'SBI Pay',
87
+ packageName: 'com.sbi.upi',
88
+ iconUrl: 'https://play-lh.googleusercontent.com/xfLptGZNr6_500DZ1neKUnhZ3uJxvE25BpcLwFgxfhv06igupXTWg2XnLgnCgkKMxe_My566wH6jwNkvhLtr=s180-rw',
89
+ brandColor: '#280071',
90
+ searchKeywords: ['sbi', 'sbipay', 'yono', 'state bank'],
91
+ enabled: true,
92
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#280071"/><circle cx="24" cy="24" r="14" fill="#00a3e0"/><circle cx="24" cy="24" r="5" fill="#280071"/><path d="M22 24h4v14h-4V24z" fill="#280071"/></svg>'
93
+ },
94
+ {
95
+ id: 'kotak-bank',
96
+ name: 'Kotak Mobile Banking',
97
+ shortName: 'Kotak',
98
+ packageName: 'com.msf.kbank.mobile',
99
+ iconUrl: 'https://play-lh.googleusercontent.com/zZUi3xWDKjYFW89Zyy-xNSTthNHUrG3AsgTDysW-oWzgTBVlLgxbL7pIWjz9wj_aZr26s4xQf5-LruhgxtiOdy8=s180-rw',
100
+ brandColor: '#ed1c24',
101
+ searchKeywords: ['kotak', '811', 'kbank'],
102
+ enabled: true,
103
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#ed1c24"/><circle cx="24" cy="24" r="12" stroke="#fff" stroke-width="4" fill="none"/><path d="M24 16v16M16 24h16" stroke="#fff" stroke-width="4"/></svg>'
104
+ },
105
+ {
106
+ id: 'bhim-axis-pay',
107
+ name: 'BHIM Axis Pay',
108
+ shortName: 'Axis Pay',
109
+ packageName: 'com.upi.axispay',
110
+ iconUrl: 'https://play-lh.googleusercontent.com/OQSiBrgEsPz11-K5CFO2p4QzDOhKGkUgzso5NCMKlvlgux6Pvt_sFd3OBoIdhMnEXb6IErxGS6DQtz_nS35nVp4=s180-rw',
111
+ brandColor: '#97144d',
112
+ searchKeywords: ['axis', 'axispay', 'bhim axis'],
113
+ enabled: true,
114
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#97144d"/><path d="M24 10l12 24H12L24 10z" fill="#fff"/><path d="M24 18l6 12H18l6-12z" fill="#97144d"/></svg>'
115
+ },
116
+ {
117
+ id: 'axis-mobile',
118
+ name: 'Axis Mobile',
119
+ shortName: 'Axis Mobile',
120
+ packageName: 'com.axis.mobile',
121
+ iconUrl: 'https://play-lh.googleusercontent.com/OQSiBrgEsPz11-K5CFO2p4QzDOhKGkUgzso5NCMKlvlgux6Pvt_sFd3OBoIdhMnEXb6IErxGS6DQtz_nS35nVp4=s180-rw',
122
+ brandColor: '#97144d',
123
+ searchKeywords: ['axis', 'axis mobile', 'bank'],
124
+ enabled: true,
125
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#97144d"/><path d="M14 34L24 14l10 20H14z" fill="#fff"/></svg>'
126
+ },
127
+ {
128
+ id: 'hdfc-bank',
129
+ name: 'HDFC Bank',
130
+ shortName: 'HDFC Bank',
131
+ packageName: 'com.snapwork.hdfc',
132
+ iconUrl: 'https://play-lh.googleusercontent.com/xj4AYs3IX_hcELMoicEJj2B4MpbpGQP2TW8klh6b9Ipv6ljNsrlROwpQS_seqQ74oT9HxtKrOiTsKHLPseYx=s180-rw',
133
+ brandColor: '#004c8f',
134
+ searchKeywords: ['hdfc', 'bank', 'mobilebanking'],
135
+ enabled: true,
136
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#004c8f"/><rect x="14" y="14" width="20" height="20" fill="#ed1c24"/><rect x="18" y="18" width="12" height="12" fill="#004c8f"/><rect x="22" y="10" width="4" height="28" fill="#004c8f"/><rect x="10" y="22" width="28" height="4" fill="#004c8f"/></svg>'
137
+ },
138
+ {
139
+ id: 'icici-pockets',
140
+ name: 'ICICI Pockets',
141
+ shortName: 'Pockets',
142
+ packageName: 'com.icicibank.pockets',
143
+ iconUrl: 'https://play-lh.googleusercontent.com/zDsjAWfZtiVzIWoFT3MhcY_ivu5InlxdrmfyCPQhcKjaFtvIO0CGwJ2rzURrmV71F9Kt4-3n-p_GRHerXibVYA=s180-rw',
144
+ brandColor: '#f37021',
145
+ searchKeywords: ['pockets', 'icici', 'wallet'],
146
+ enabled: true,
147
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#f37021"/><circle cx="24" cy="24" r="12" fill="#fff"/><path d="M20 20h8v8h-8z" fill="#b02a30"/></svg>'
148
+ },
149
+ {
150
+ id: 'idfc-first-bank',
151
+ name: 'IDFC FIRST Bank',
152
+ shortName: 'IDFC FIRST',
153
+ packageName: 'com.idfcfirstbank.optimus',
154
+ iconUrl: 'https://play-lh.googleusercontent.com/WzDtotDEhTRKaEm06LbJuTZ5sm54Bx-qSWYRULxlUboNbFOJGRvrlJ8kFr_Vk7AePA3ATkTk3UmEO3ITQc2_yQ=s180-rw',
155
+ brandColor: '#9d1d27',
156
+ searchKeywords: ['idfc', 'first bank', 'idfcfirst'],
157
+ enabled: true,
158
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#9d1d27"/><path d="M16 16h16v16H16z" fill="#f37021"/><path d="M20 20h8v8h-8z" fill="#fff"/></svg>'
159
+ },
160
+ {
161
+ id: 'induspay',
162
+ name: 'IndusPay',
163
+ shortName: 'IndusPay',
164
+ packageName: 'com.mgs.induspsp',
165
+ iconUrl: 'https://play-lh.googleusercontent.com/5CWr-hYR57D7-5s51SsPlm69to3NE5poC5ChdxWjSq31cevVW7Oo-U9yhX7mUIcFdF5FQNFFdD0N4MYubUZh3A=s180-rw',
166
+ brandColor: '#84191b',
167
+ searchKeywords: ['indusind', 'induspay', 'indus'],
168
+ enabled: true,
169
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#84191b"/><path d="M14 24c0-5.5 4.5-10 10-10s10 4.5 10 10-4.5 10-10 10-10-4.5-10-10z" fill="#fff"/><path d="M24 16v16" stroke="#84191b" stroke-width="3"/></svg>'
170
+ },
171
+ {
172
+ id: 'jupiter',
173
+ name: 'Jupiter',
174
+ shortName: 'Jupiter',
175
+ packageName: 'money.jupiter',
176
+ iconUrl: 'https://play-lh.googleusercontent.com/hoFj8VTUn0aM2SBW9nmje6E0wX7B-hAj4uvbl2CqJnDMrXoKkrkemgxPLOOycFfmOL0cXziJpa-Ae-T5pS1QE-o=s180-rw',
177
+ brandColor: '#ff7754',
178
+ searchKeywords: ['jupiter', 'money', 'banking'],
179
+ enabled: true,
180
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#ff7754"/><circle cx="24" cy="24" r="10" fill="#fff"/><circle cx="28" cy="20" r="3" fill="#ff7754"/></svg>'
181
+ },
182
+ {
183
+ id: 'mobikwik',
184
+ name: 'MobiKwik',
185
+ shortName: 'MobiKwik',
186
+ packageName: 'com.mobikwik_new',
187
+ iconUrl: 'https://play-lh.googleusercontent.com/Uvs56Ws0HOjsm7iOkl7nWaPHutFkZBwr6JoMu4bGCSGyQUyGD8FwzPF-LdrkTZC9M2vVDIF9ocznlv2y334Z=s180-rw',
188
+ brandColor: '#0075d3',
189
+ searchKeywords: ['mobikwik', 'wallet', 'zip'],
190
+ enabled: true,
191
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#0075d3"/><path d="M14 16l10 8 10-8v16H14V16z" fill="#fff"/></svg>'
192
+ },
193
+ {
194
+ id: 'airtel-thanks',
195
+ name: 'Airtel Thanks',
196
+ shortName: 'Airtel',
197
+ packageName: 'com.myairtelapp',
198
+ iconUrl: 'https://play-lh.googleusercontent.com/v00UJ-fq2PRJgxukJtiZY5JVGcP-uEi44zRWWIgTaB7kw6lZ8KOxpqTsIQe-MLcS_ojUT3XXY-XfoiCUL1J9lg=s180-rw',
199
+ brandColor: '#e40000',
200
+ searchKeywords: ['airtel', 'thanks', 'payments bank'],
201
+ enabled: true,
202
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#e40000"/><path d="M16 28c4-12 12-12 16 0" stroke="#fff" stroke-width="4" stroke-linecap="round"/></svg>'
203
+ },
204
+ {
205
+ id: 'freecharge',
206
+ name: 'Freecharge',
207
+ shortName: 'Freecharge',
208
+ packageName: 'com.freecharge.android',
209
+ iconUrl: 'https://play-lh.googleusercontent.com/e5Y4ftiOjuk-WWQiDfof8HEk3UvqmqYUuKpJqszr6vEgyIg0H4Z-r47GV6fTSC339hgzPuz9Waa0Ir5Lxuqa_A=s180-rw',
210
+ brandColor: '#53b449',
211
+ searchKeywords: ['freecharge', 'axis', 'wallet'],
212
+ enabled: true,
213
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#53b449"/><path d="M26 12L16 26h8l-2 10 12-14h-8l2-10z" fill="#fff"/></svg>'
214
+ },
215
+ {
216
+ id: 'samsung-pay',
217
+ name: 'Samsung Pay',
218
+ shortName: 'Samsung Pay',
219
+ packageName: 'com.samsung.android.spay',
220
+ iconUrl: 'https://play-lh.googleusercontent.com/Oy8bbVOACpQsG-1SVj1KgA_6hL1mGS8iI1zy9Z0NgK2Kz_dLyDNfpDFDY0BmKN52x9Y4vvHfcQYF8wVeW5K5zQ=s180-rw',
221
+ brandColor: '#1259c3',
222
+ searchKeywords: ['samsung', 'wallet', 'spay'],
223
+ enabled: true,
224
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#1259c3"/><rect x="14" y="16" width="20" height="16" rx="3" stroke="#fff" stroke-width="3" fill="none"/><path d="M14 22h20" stroke="#fff" stroke-width="2"/></svg>'
225
+ },
226
+ {
227
+ id: 'truecaller',
228
+ name: 'Truecaller',
229
+ shortName: 'Truecaller',
230
+ packageName: 'com.truecaller',
231
+ iconUrl: 'https://play-lh.googleusercontent.com/kVMxXC3fV4cyG56MZunYS2-HYaHh3eM3YTWoDbYaN5-G9xIU2k235hHVQmRrm79tzBSzt0cZ6GsBbzGzGbbMwg=s180-rw',
232
+ brandColor: '#0087ff',
233
+ searchKeywords: ['truecaller', 'caller', 'upi'],
234
+ enabled: true,
235
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#0087ff"/><path d="M18 16c2-2 4-2 6 0l2 3c1 1 1 2 0 3l-2 2c2 3 4 5 7 7l2-2c1-1 2-1 3 0l3 2c2 2 2 4 0 6-3 3-8 2-14-4s-7-11-4-14z" fill="#fff"/></svg>'
236
+ },
237
+ {
238
+ id: 'tata-neu',
239
+ name: 'Tata Neu',
240
+ shortName: 'Tata Neu',
241
+ packageName: 'com.tatadigital.tcp',
242
+ iconUrl: 'https://play-lh.googleusercontent.com/kTa8k1W70pv5O5IUt5PyjUa7GNp3B30mlBqDAwmhEDYbM3N0n1zDGF27EbNdXq2gt22VYX0SmtRp-SttEU_s3Q=s180-rw',
243
+ brandColor: '#68297b',
244
+ searchKeywords: ['tata', 'neu', 'tatapay'],
245
+ enabled: true,
246
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#68297b"/><circle cx="24" cy="24" r="12" stroke="#fff" stroke-width="3" fill="none"/><path d="M20 20l8 8" stroke="#fff" stroke-width="3"/></svg>'
247
+ },
248
+ {
249
+ id: 'slice',
250
+ name: 'Slice',
251
+ shortName: 'Slice',
252
+ packageName: 'indwin.c3.shareapp',
253
+ iconUrl: 'https://play-lh.googleusercontent.com/WfVXB0bKHlMXCdaed1pcALPt8spjVgMs13EEvlus6ZJHH4xeiUaqHiHYopc5jZXqy8DLdjU0TU3S7loqisQjVw=s180-rw',
254
+ brandColor: '#753bdf',
255
+ searchKeywords: ['slice', 'upi', 'card'],
256
+ enabled: true,
257
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#753bdf"/><path d="M14 24h20M24 14v20" stroke="#fff" stroke-width="4" stroke-linecap="round"/></svg>'
258
+ },
259
+ {
260
+ id: 'kiwi',
261
+ name: 'Kiwi',
262
+ shortName: 'Kiwi',
263
+ packageName: 'in.gokiwi.kiwitpap',
264
+ iconUrl: 'https://play-lh.googleusercontent.com/Kfy6YJA0m5Oqo63MWzOHCi5E2rYdHmN2AK6KqlKPqv7OKrXYsM2rCWNiSecuQZxsXKBZK3BwKCKFDj2wvkxj5Q=s180-rw',
265
+ brandColor: '#96d800',
266
+ searchKeywords: ['kiwi', 'rupay', 'rewards'],
267
+ enabled: true,
268
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#96d800"/><circle cx="24" cy="24" r="12" fill="#2d3748"/><circle cx="24" cy="24" r="6" fill="#fff"/></svg>'
269
+ },
270
+ {
271
+ id: 'fi-money',
272
+ name: 'Fi Money',
273
+ shortName: 'Fi Money',
274
+ packageName: 'com.epifi.paisa',
275
+ iconUrl: 'https://fi.money/assets/svgs/logo.svg',
276
+ brandColor: '#00d09c',
277
+ searchKeywords: ['fi', 'epifi', 'federal', 'money'],
278
+ enabled: true,
279
+ svgLogo: '<svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M31.331 12.825c0-3.206 2.699-5.797 6.024-5.797s6.027 2.596 6.027 5.797-2.699 5.797-6.027 5.797-6.024-2.591-6.024-5.797zM48 35.662h-1.347c-2.763 0-4.156-1.96-4.156-5.047v-5.797h-10.21v8.216c0 8.927 5.918 12.674 11.646 12.674H48V35.662zM14.226 38.42c0-2.986 1.652-4.344 5.007-4.344h8.325v-9.284H14.226v-3.833c0-3.032 2.617-4.68 5.742-4.68h7.577V7H17.363C9.362 7 4 11.234 4 20.11v25.575h10.226V38.42z" fill="#00b899"/></svg>'
280
+ },
281
+ {
282
+ id: 'groww',
283
+ name: 'Groww',
284
+ shortName: 'Groww',
285
+ packageName: 'com.nextbillion.groww',
286
+ iconUrl: 'https://play-lh.googleusercontent.com/dG1q2wx6Nk3aN6FIna144DYXI51P1cnbmBSRSvxKMZcZEDXcBv1-clSpc_PgjsE-UkGUCmX1kvRF-D443l3e=s180-rw',
287
+ brandColor: '#00d09c',
288
+ searchKeywords: ['groww', 'stocks', 'pay'],
289
+ enabled: true,
290
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#121212"/><circle cx="24" cy="24" r="12" fill="#00d09c"/><path d="M20 28l4-8 4 8" stroke="#121212" stroke-width="2" fill="none"/></svg>'
291
+ },
292
+ {
293
+ id: 'bandhan-upi',
294
+ name: 'Bandhan UPI',
295
+ shortName: 'Bandhan',
296
+ packageName: 'com.fisglobal.bandhanupi.app',
297
+ iconUrl: 'https://play-lh.googleusercontent.com/A-jnlycom7vmHnVoXaEJHKYH4DtqZR_XAUuZeVSY7aOzKGXDYZtyoMNxIwkvRh0csi78rryuel-hQELqoPUq=s180-rw',
298
+ brandColor: '#003366',
299
+ searchKeywords: ['bandhan', 'bandhanbank', 'mbandhan'],
300
+ enabled: true,
301
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#003366"/><path d="M16 16h16v16H16z" stroke="#ed1c24" stroke-width="3" fill="none"/></svg>'
302
+ },
303
+ {
304
+ id: 'bank-of-baroda',
305
+ name: 'Bank of Baroda',
306
+ shortName: 'BOB',
307
+ packageName: 'com.bankofbaroda.upi',
308
+ iconUrl: 'https://play-lh.googleusercontent.com/d-8feMJrkwfK7a52y54FqOcDmsP0RfkunIAhkCXUKEKIAjdPfWhgleGbw7sz9Q5vMbUjQrldIgWle77Y1co9sw=s180-rw',
309
+ brandColor: '#f26522',
310
+ searchKeywords: ['bob', 'baroda', 'bobworld'],
311
+ enabled: true,
312
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#f26522"/><circle cx="24" cy="24" r="10" stroke="#fff" stroke-width="4" fill="none"/></svg>'
313
+ },
314
+ {
315
+ id: 'canara-bank',
316
+ name: 'Canara Bank',
317
+ shortName: 'Canara',
318
+ packageName: 'com.canarabank.mobility',
319
+ iconUrl: 'https://play-lh.googleusercontent.com/B-5J_cjTSG0wHM6S1XvOSSI12n6OCeKA6QsICTeAEjhb7Xusf7b5VCzGTDBOdHwQJkRpdUCOEZdUytAcJxy0LQ=s180-rw',
320
+ brandColor: '#0091da',
321
+ searchKeywords: ['canara', 'ai1', 'canarabank'],
322
+ enabled: true,
323
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#0091da"/><path d="M16 28l8-14 8 14H16z" fill="#fdb913"/></svg>'
324
+ },
325
+ {
326
+ id: 'union-bank',
327
+ name: 'Union Bank',
328
+ shortName: 'Union Bank',
329
+ packageName: 'com.infrasoft.uboi',
330
+ iconUrl: 'https://play-lh.googleusercontent.com/pH69DoogXyzHVcGVKanlBfIBVCvX8WMQ1MZpqKM1_OHva4YTPchbq9n-ANXlEigGVst8657dp7iMmSWwVlB_=s180-rw',
331
+ brandColor: '#004c8f',
332
+ searchKeywords: ['union', 'uboi', 'vyom'],
333
+ enabled: true,
334
+ svgLogo: '<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="48" height="48" rx="12" fill="#004c8f"/><path d="M16 16v10c0 4.4 3.6 8 8 8s8-3.6 8-8V16h-4v10c0 2.2-1.8 4-4 4s-4-1.8-4-4V16h-4z" fill="#fff"/></svg>'
335
+ }
336
+ ];
337
+
338
+ export function getUpiProviders() {
339
+ return [...UPI_PROVIDERS];
340
+ }
341
+
342
+ export function findUpiProviderByPackage(packageName) {
343
+ if (!packageName) return undefined;
344
+ const clean = packageName.trim().toLowerCase();
345
+ return UPI_PROVIDERS.find(p => p.packageName.toLowerCase() === clean);
346
+ }
347
+
348
+ export function findUpiProviderById(id) {
349
+ if (!id) return undefined;
350
+ const clean = id.trim().toLowerCase();
351
+ return UPI_PROVIDERS.find(p => p.id.toLowerCase() === clean);
352
+ }
353
+
354
+ /**
355
+ * Official companion SMS and banking notification application packages
356
+ * permitted to deliver real-time credit payment observations to ELPAY Gateway.
357
+ */
358
+ export const BANKING_AND_MESSAGING_PACKAGES = Object.freeze([
359
+ 'com.google.android.apps.messaging',
360
+ 'com.samsung.android.messaging',
361
+ 'com.fampay.in',
362
+ 'com.sbi.lotusintouch',
363
+ 'com.hdfcbank.payzapp',
364
+ 'com.bankofbaroda.mconnect',
365
+ 'com.infrasofttech.indianbank',
366
+ 'com.fedmobile'
367
+ ]);
368
+
369
+ /**
370
+ * Canonical unified allowlist of all verified UPI payment and banking observation packages.
371
+ */
372
+ export const ALLOWED_NOTIFICATION_PACKAGES = Object.freeze(
373
+ Array.from(new Set([
374
+ ...UPI_PROVIDERS.map(p => p.packageName.toLowerCase()),
375
+ ...BANKING_AND_MESSAGING_PACKAGES.map(p => p.toLowerCase())
376
+ ])).sort()
377
+ );
378
+
379
+ /**
380
+ * Verifies whether a given Android package identifier is an authorized banking/UPI provider.
381
+ * @param {string} packageName
382
+ * @returns {boolean}
383
+ */
384
+ export function isAllowedNotificationPackage(packageName) {
385
+ if (!packageName || typeof packageName !== 'string') return false;
386
+ const clean = packageName.trim().toLowerCase();
387
+ return ALLOWED_NOTIFICATION_PACKAGES.includes(clean);
388
+ }
389
+