Yashkatiyar commited on
Commit
5965003
·
verified ·
1 Parent(s): a30893f

I want to build a fully-featured payment simulation app that mimics the user experience of real UPI-based payment platforms. The app should: Allow users to simulate a payment via QR code scanning or by entering a UPI ID. Display a realistic payment success screen similar to apps like Google Pay or PhonePe. Trigger a notification-style pop-up on the recipient’s device indicating that the amount has been "credited." The app should not connect to actual bank accounts or process real financial transactions — it is intended for simulation and presentation purposes only. The interface should be clean, intuitive, and resemble the experience of using a real payment app, including a transaction history view and digital wallet layout. This tool is designed for UX prototyping, training demonstrations, role-play scenarios, or entertainment purposes where no real money is transferred.mak - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +5 -3
  2. index.html +353 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Haha
3
- emoji: 👀
4
  colorFrom: blue
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: haha
3
+ emoji: 🐳
4
  colorFrom: blue
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,353 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>UPI Payment Simulator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .notification {
11
+ animation: slideIn 0.5s forwards, fadeOut 0.5s 3s forwards;
12
+ }
13
+
14
+ @keyframes slideIn {
15
+ from { transform: translateY(100px); opacity: 0; }
16
+ to { transform: translateY(0); opacity: 1; }
17
+ }
18
+
19
+ @keyframes fadeOut {
20
+ from { opacity: 1; }
21
+ to { opacity: 0; }
22
+ }
23
+
24
+ .qr-scanner {
25
+ animation: pulse 2s infinite;
26
+ }
27
+
28
+ @keyframes pulse {
29
+ 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
30
+ 70% { box-shadow: 0 0 0 20px rgba(74, 222, 128, 0); }
31
+ 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
32
+ }
33
+
34
+ .floating-btn {
35
+ animation: float 3s ease-in-out infinite;
36
+ }
37
+
38
+ @keyframes float {
39
+ 0% { transform: translateY(0px); }
40
+ 50% { transform: translateY(-10px); }
41
+ 100% { transform: translateY(0px); }
42
+ }
43
+ </style>
44
+ </head>
45
+ <body class="bg-gray-100 font-sans">
46
+ <!-- Main App Container -->
47
+ <div class="max-w-md mx-auto bg-white min-h-screen shadow-lg relative overflow-hidden">
48
+ <!-- Header -->
49
+ <div class="bg-green-600 text-white p-4 flex justify-between items-center">
50
+ <div class="flex items-center space-x-2">
51
+ <i class="fas fa-wallet text-2xl"></i>
52
+ <h1 class="text-xl font-bold">UPI Simulator</h1>
53
+ </div>
54
+ <div class="flex items-center space-x-3">
55
+ <i class="fas fa-bell"></i>
56
+ <i class="fas fa-user-circle text-2xl"></i>
57
+ </div>
58
+ </div>
59
+
60
+ <!-- Wallet Balance -->
61
+ <div class="bg-green-50 p-6 mx-4 my-4 rounded-xl shadow-sm">
62
+ <p class="text-gray-600 text-sm">Available Balance</p>
63
+ <div class="flex justify-between items-center">
64
+ <h2 class="text-3xl font-bold">₹5,000.00</h2>
65
+ <button class="bg-green-600 text-white px-3 py-1 rounded-full text-sm">Add Money</button>
66
+ </div>
67
+ </div>
68
+
69
+ <!-- Payment Options -->
70
+ <div class="p-4">
71
+ <div class="grid grid-cols-4 gap-4 text-center">
72
+ <button onclick="showPaymentScreen('scan')" class="flex flex-col items-center">
73
+ <div class="bg-green-100 p-3 rounded-full mb-1">
74
+ <i class="fas fa-qrcode text-green-600 text-xl"></i>
75
+ </div>
76
+ <span class="text-xs">Scan QR</span>
77
+ </button>
78
+ <button onclick="showPaymentScreen('upi')" class="flex flex-col items-center">
79
+ <div class="bg-blue-100 p-3 rounded-full mb-1">
80
+ <i class="fas fa-money-bill-transfer text-blue-600 text-xl"></i>
81
+ </div>
82
+ <span class="text-xs">UPI ID</span>
83
+ </button>
84
+ <button class="flex flex-col items-center">
85
+ <div class="bg-purple-100 p-3 rounded-full mb-1">
86
+ <i class="fas fa-mobile-screen text-purple-600 text-xl"></i>
87
+ </div>
88
+ <span class="text-xs">Mobile No.</span>
89
+ </button>
90
+ <button class="flex flex-col items-center">
91
+ <div class="bg-yellow-100 p-3 rounded-full mb-1">
92
+ <i class="fas fa-credit-card text-yellow-600 text-xl"></i>
93
+ </div>
94
+ <span class="text-xs">Bank Account</span>
95
+ </button>
96
+ </div>
97
+ </div>
98
+
99
+ <!-- Recent Transactions -->
100
+ <div class="p-4">
101
+ <h3 class="font-bold text-lg mb-3">Recent Transactions</h3>
102
+ <div class="space-y-3">
103
+ <div class="flex items-center justify-between p-2 border-b">
104
+ <div class="flex items-center space-x-3">
105
+ <div class="bg-red-100 p-2 rounded-full">
106
+ <i class="fas fa-shopping-bag text-red-500"></i>
107
+ </div>
108
+ <div>
109
+ <p class="font-medium">Amazon India</p>
110
+ <p class="text-xs text-gray-500">Today, 10:45 AM</p>
111
+ </div>
112
+ </div>
113
+ <p class="font-bold text-red-500">- ₹1,299.00</p>
114
+ </div>
115
+ <div class="flex items-center justify-between p-2 border-b">
116
+ <div class="flex items-center space-x-3">
117
+ <div class="bg-green-100 p-2 rounded-full">
118
+ <i class="fas fa-user text-green-500"></i>
119
+ </div>
120
+ <div>
121
+ <p class="font-medium">Rahul Sharma</p>
122
+ <p class="text-xs text-gray-500">Yesterday, 5:30 PM</p>
123
+ </div>
124
+ </div>
125
+ <p class="font-bold text-green-500">+ ₹500.00</p>
126
+ </div>
127
+ <div class="flex items-center justify-between p-2 border-b">
128
+ <div class="flex items-center space-x-3">
129
+ <div class="bg-blue-100 p-2 rounded-full">
130
+ <i class="fas fa-utensils text-blue-500"></i>
131
+ </div>
132
+ <div>
133
+ <p class="font-medium">Food Court</p>
134
+ <p class="text-xs text-gray-500">Yesterday, 1:15 PM</p>
135
+ </div>
136
+ </div>
137
+ <p class="font-bold text-red-500">- ₹350.00</p>
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+ <!-- Floating Action Button -->
143
+ <button onclick="showPaymentScreen('scan')" class="floating-btn fixed bottom-6 right-6 bg-green-600 text-white p-4 rounded-full shadow-lg z-10">
144
+ <i class="fas fa-qrcode text-2xl"></i>
145
+ </button>
146
+
147
+ <!-- Payment Screens (Hidden by default) -->
148
+
149
+ <!-- QR Scanner Screen -->
150
+ <div id="scanScreen" class="absolute inset-0 bg-white z-20 hidden flex-col">
151
+ <div class="bg-green-600 text-white p-4 flex justify-between items-center">
152
+ <button onclick="hidePaymentScreen('scan')" class="text-white">
153
+ <i class="fas fa-arrow-left"></i>
154
+ </button>
155
+ <h2 class="text-lg font-bold">Scan QR Code</h2>
156
+ <div class="w-6"></div> <!-- Spacer -->
157
+ </div>
158
+
159
+ <div class="flex-1 flex flex-col items-center justify-center p-6">
160
+ <div class="qr-scanner border-4 border-green-400 rounded-lg w-64 h-64 relative overflow-hidden mb-8">
161
+ <div class="absolute inset-0 flex items-center justify-center">
162
+ <div class="bg-white p-4 rounded">
163
+ <div class="grid grid-cols-3 gap-1">
164
+ <div class="w-6 h-6 bg-black"></div>
165
+ <div class="w-6 h-6 bg-black"></div>
166
+ <div class="w-6 h-6 bg-black"></div>
167
+ <div class="w-6 h-6 bg-black"></div>
168
+ <div class="w-6 h-6 bg-white"></div>
169
+ <div class="w-6 h-6 bg-black"></div>
170
+ <div class="w-6 h-6 bg-black"></div>
171
+ <div class="w-6 h-6 bg-white"></div>
172
+ <div class="w-6 h-6 bg-black"></div>
173
+ </div>
174
+ </div>
175
+ </div>
176
+ </div>
177
+
178
+ <p class="text-center text-gray-600 mb-6">Align the QR code within the frame to scan</p>
179
+
180
+ <button onclick="simulateQRScan()" class="bg-green-600 text-white px-6 py-3 rounded-full font-medium">
181
+ Simulate Scan
182
+ </button>
183
+ </div>
184
+ </div>
185
+
186
+ <!-- UPI ID Payment Screen -->
187
+ <div id="upiScreen" class="absolute inset-0 bg-white z-20 hidden flex-col">
188
+ <div class="bg-green-600 text-white p-4 flex justify-between items-center">
189
+ <button onclick="hidePaymentScreen('upi')" class="text-white">
190
+ <i class="fas fa-arrow-left"></i>
191
+ </button>
192
+ <h2 class="text-lg font-bold">Send to UPI ID</h2>
193
+ <div class="w-6"></div> <!-- Spacer -->
194
+ </div>
195
+
196
+ <div class="flex-1 flex flex-col p-6">
197
+ <div class="bg-gray-100 p-4 rounded-lg mb-6">
198
+ <p class="text-sm text-gray-500 mb-1">Enter UPI ID</p>
199
+ <div class="flex items-center">
200
+ <input type="text" id="upiId" placeholder="name@upi" class="bg-transparent flex-1 outline-none">
201
+ <button class="text-blue-500 font-medium">Verify</button>
202
+ </div>
203
+ </div>
204
+
205
+ <div class="bg-gray-100 p-4 rounded-lg mb-6">
206
+ <p class="text-sm text-gray-500 mb-1">Amount</p>
207
+ <div class="flex items-center">
208
+ <span class="text-lg mr-1">₹</span>
209
+ <input type="number" id="paymentAmount" placeholder="0" class="bg-transparent flex-1 outline-none text-xl">
210
+ </div>
211
+ </div>
212
+
213
+ <div class="bg-gray-100 p-4 rounded-lg mb-6">
214
+ <p class="text-sm text-gray-500 mb-1">Remarks (Optional)</p>
215
+ <input type="text" placeholder="e.g. Dinner bill" class="bg-transparent flex-1 outline-none">
216
+ </div>
217
+
218
+ <button onclick="simulateUPIPayment()" class="bg-green-600 text-white px-6 py-3 rounded-full font-medium mt-auto">
219
+ Send Money
220
+ </button>
221
+ </div>
222
+ </div>
223
+
224
+ <!-- Payment Success Screen -->
225
+ <div id="successScreen" class="absolute inset-0 bg-white z-30 hidden flex-col items-center justify-center p-6">
226
+ <div class="bg-green-100 p-6 rounded-full mb-6">
227
+ <i class="fas fa-check-circle text-green-600 text-5xl"></i>
228
+ </div>
229
+
230
+ <h2 class="text-2xl font-bold mb-2">Payment Successful</h2>
231
+ <p class="text-gray-600 mb-8">Your payment has been processed successfully</p>
232
+
233
+ <div class="bg-gray-100 p-4 rounded-lg w-full mb-6">
234
+ <div class="flex justify-between mb-3">
235
+ <p class="text-gray-600">Amount</p>
236
+ <p class="font-bold" id="successAmount">₹500.00</p>
237
+ </div>
238
+ <div class="flex justify-between mb-3">
239
+ <p class="text-gray-600">To</p>
240
+ <p class="font-bold" id="successRecipient">rahul@upi</p>
241
+ </div>
242
+ <div class="flex justify-between">
243
+ <p class="text-gray-600">Transaction ID</p>
244
+ <p class="text-gray-600">SIM2023<span id="randomId">12345</span></p>
245
+ </div>
246
+ </div>
247
+
248
+ <button onclick="hidePaymentScreen('success')" class="bg-green-600 text-white px-6 py-3 rounded-full font-medium w-full">
249
+ Done
250
+ </button>
251
+
252
+ <button onclick="showRecipientNotification()" class="mt-4 text-blue-500">
253
+ Show Recipient Notification
254
+ </button>
255
+ </div>
256
+
257
+ <!-- Recipient Notification -->
258
+ <div id="recipientNotification" class="notification fixed bottom-4 left-4 right-4 bg-white rounded-lg shadow-lg p-4 z-40 hidden">
259
+ <div class="flex items-start">
260
+ <div class="bg-green-100 p-2 rounded-full mr-3">
261
+ <i class="fas fa-rupee-sign text-green-600"></i>
262
+ </div>
263
+ <div class="flex-1">
264
+ <h3 class="font-bold">Money Received</h3>
265
+ <p class="text-sm text-gray-600">You've received <span id="notificationAmount">₹500.00</span> from <span id="notificationSender">user@example.com</span></p>
266
+ </div>
267
+ <button onclick="hideNotification()" class="text-gray-400">
268
+ <i class="fas fa-times"></i>
269
+ </button>
270
+ </div>
271
+ </div>
272
+ </div>
273
+
274
+ <script>
275
+ // Show payment screen
276
+ function showPaymentScreen(type) {
277
+ if (type === 'scan') {
278
+ document.getElementById('scanScreen').classList.remove('hidden');
279
+ document.getElementById('scanScreen').classList.add('flex');
280
+ } else if (type === 'upi') {
281
+ document.getElementById('upiScreen').classList.remove('hidden');
282
+ document.getElementById('upiScreen').classList.add('flex');
283
+ } else if (type === 'success') {
284
+ document.getElementById('successScreen').classList.remove('hidden');
285
+ document.getElementById('successScreen').classList.add('flex');
286
+ }
287
+ }
288
+
289
+ // Hide payment screen
290
+ function hidePaymentScreen(type) {
291
+ if (type === 'scan') {
292
+ document.getElementById('scanScreen').classList.add('hidden');
293
+ document.getElementById('scanScreen').classList.remove('flex');
294
+ } else if (type === 'upi') {
295
+ document.getElementById('upiScreen').classList.add('hidden');
296
+ document.getElementById('upiScreen').classList.remove('flex');
297
+ } else if (type === 'success') {
298
+ document.getElementById('successScreen').classList.add('hidden');
299
+ document.getElementById('successScreen').classList.remove('flex');
300
+ }
301
+ }
302
+
303
+ // Simulate QR scan
304
+ function simulateQRScan() {
305
+ // Set success details
306
+ document.getElementById('successAmount').textContent = '₹500.00';
307
+ document.getElementById('successRecipient').textContent = 'qrmerchant@upi';
308
+ document.getElementById('randomId').textContent = Math.floor(Math.random() * 90000) + 10000;
309
+
310
+ // Show success screen
311
+ hidePaymentScreen('scan');
312
+ showPaymentScreen('success');
313
+ }
314
+
315
+ // Simulate UPI payment
316
+ function simulateUPIPayment() {
317
+ const upiId = document.getElementById('upiId').value || 'example@upi';
318
+ const amount = document.getElementById('paymentAmount').value || '500';
319
+
320
+ // Set success details
321
+ document.getElementById('successAmount').textContent = `₹${amount}.00`;
322
+ document.getElementById('successRecipient').textContent = upiId;
323
+ document.getElementById('randomId').textContent = Math.floor(Math.random() * 90000) + 10000;
324
+
325
+ // Set notification details
326
+ document.getElementById('notificationAmount').textContent = `₹${amount}.00`;
327
+ document.getElementById('notificationSender').textContent = 'you@example.com';
328
+
329
+ // Show success screen
330
+ hidePaymentScreen('upi');
331
+ showPaymentScreen('success');
332
+ }
333
+
334
+ // Show recipient notification
335
+ function showRecipientNotification() {
336
+ hidePaymentScreen('success');
337
+
338
+ const notification = document.getElementById('recipientNotification');
339
+ notification.classList.remove('hidden');
340
+
341
+ // Auto hide after 3 seconds
342
+ setTimeout(() => {
343
+ notification.classList.add('hidden');
344
+ }, 3000);
345
+ }
346
+
347
+ // Hide notification manually
348
+ function hideNotification() {
349
+ document.getElementById('recipientNotification').classList.add('hidden');
350
+ }
351
+ </script>
352
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Yashkatiyar/haha" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
353
+ </html>