Spaces:
Running

File size: 21,204 Bytes
fbeb3f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WooPIX - Pagamento via PIX Automático</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .pix-qr-code {
            background: linear-gradient(135deg, #32BBAD 0%, #2D9CDB 100%);
            border-radius: 12px;
            padding: 20px;
            position: relative;
            overflow: hidden;
        }
        .pix-qr-code::before {
            content: "";
            position: absolute;
            top: -50px;
            right: -50px;
            width: 100px;
            height: 100px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
        }
        .pix-qr-code::after {
            content: "";
            position: absolute;
            bottom: -30px;
            left: -30px;
            width: 60px;
            height: 60px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
        }
        .copy-btn {
            transition: all 0.3s ease;
        }
        .copy-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        .copy-btn.copied {
            background-color: #10B981 !important;
        }
        .status-pulse {
            animation: pulse 2s infinite;
        }
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
    </style>
</head>
<body class="bg-gray-50 font-sans">
    <div class="container mx-auto px-4 py-8 max-w-4xl">
        <!-- Plugin Header -->
        <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
            <div class="p-6 bg-gradient-to-r from-blue-600 to-green-500 text-white">
                <div class="flex items-center justify-between">
                    <div>
                        <h1 class="text-2xl font-bold">WooPIX</h1>
                        <p class="opacity-90">Pagamento via PIX com liberação automática</p>
                    </div>
                    <div class="bg-white text-blue-600 px-4 py-2 rounded-lg font-semibold">
                        v1.2.0
                    </div>
                </div>
            </div>
            
            <!-- Plugin Navigation -->
            <div class="bg-gray-100 px-6 py-3 flex space-x-6 border-b">
                <a href="#" class="text-blue-600 font-medium border-b-2 border-blue-600 pb-1">Configurações</a>
                <a href="#" class="text-gray-600 hover:text-blue-600">Transações</a>
                <a href="#" class="text-gray-600 hover:text-blue-600">Logs</a>
                <a href="#" class="text-gray-600 hover:text-blue-600">Suporte</a>
            </div>
            
            <!-- Plugin Content -->
            <div class="p-6">
                <div class="mb-8">
                    <h2 class="text-xl font-semibold mb-4">Configurações Gerais</h2>
                    
                    <div class="space-y-6">
                        <!-- Chave PIX -->
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">Chave PIX</label>
                            <div class="flex">
                                <select class="rounded-l-md border-r-0 border-gray-300 focus:ring-blue-500 focus:border-blue-500">
                                    <option>CPF</option>
                                    <option>CNPJ</option>
                                    <option>E-mail</option>
                                    <option>Telefone</option>
                                    <option>Chave Aleatória</option>
                                </select>
                                <input type="text" class="flex-1 min-w-0 block w-full px-3 py-2 rounded-none border-gray-300 focus:ring-blue-500 focus:border-blue-500" placeholder="Insira sua chave PIX">
                                <button class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-r-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
                                    <i class="fas fa-save mr-2"></i> Salvar
                                </button>
                            </div>
                            <p class="mt-1 text-sm text-gray-500">Esta chave será usada para receber os pagamentos.</p>
                        </div>
                        
                        <!-- Tempo de Expiração -->
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">Tempo de Expiração</label>
                            <div class="flex items-center space-x-2">
                                <input type="number" value="30" class="w-20 px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
                                <span class="text-gray-700">minutos</span>
                            </div>
                            <p class="mt-1 text-sm text-gray-500">Tempo que o QR Code ficará válido para pagamento.</p>
                        </div>
                        
                        <!-- Liberação Automática -->
                        <div class="flex items-start">
                            <div class="flex items-center h-5">
                                <input id="auto-release" name="auto-release" type="checkbox" checked class="focus:ring-blue-500 h-4 w-4 text-blue-600 border-gray-300 rounded">
                            </div>
                            <div class="ml-3 text-sm">
                                <label for="auto-release" class="font-medium text-gray-700">Liberação Automática</label>
                                <p class="text-gray-500">Ativar para liberar produtos automaticamente após confirmação do pagamento.</p>
                            </div>
                        </div>
                        
                        <!-- Webhook URL -->
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">URL de Webhook</label>
                            <div class="flex">
                                <input type="text" readonly value="https://seusite.com.br/wc-api/woopix_callback" class="flex-1 min-w-0 block w-full px-3 py-2 rounded-l-md border-gray-300 bg-gray-100 focus:ring-blue-500 focus:border-blue-500">
                                <button onclick="copyToClipboard(this)" class="copy-btn inline-flex items-center px-4 py-2 bg-gray-600 text-white rounded-r-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500">
                                    <i class="fas fa-copy mr-2"></i> Copiar
                                </button>
                            </div>
                            <p class="mt-1 text-sm text-gray-500">Configure esta URL no seu provedor PIX para receber notificações de pagamento.</p>
                        </div>
                    </div>
                </div>
                
                <div class="mb-8">
                    <h2 class="text-xl font-semibold mb-4">Configurações Avançadas</h2>
                    
                    <div class="space-y-6">
                        <!-- Instruções para o Cliente -->
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">Instruções para o Cliente</label>
                            <textarea rows="4" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">1. Abra o aplicativo do seu banco e selecione a opção PIX
2. Escaneie o QR Code ou copie o código PIX
3. Confira os dados e finalize o pagamento
4. Seu pedido será liberado automaticamente em até 2 minutos</textarea>
                            <p class="mt-1 text-sm text-gray-500">Estas instruções serão exibidas para o cliente durante o checkout.</p>
                        </div>
                        
                        <!-- Mensagem de Conclusão -->
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-1">Mensagem de Conclusão</label>
                            <textarea rows="2" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">Obrigado pelo seu pagamento! Seu pedido foi liberado com sucesso.</textarea>
                            <p class="mt-1 text-sm text-gray-500">Mensagem exibida após confirmação do pagamento.</p>
                        </div>
                    </div>
                </div>
                
                <div class="flex justify-end space-x-3">
                    <button class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500">
                        Cancelar
                    </button>
                    <button class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <i class="fas fa-save mr-2"></i> Salvar Configurações
                    </button>
                </div>
            </div>
        </div>
        
        <!-- Demo Checkout -->
        <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8">
            <div class="p-6 border-b">
                <h2 class="text-xl font-semibold">Demonstração do Checkout</h2>
                <p class="text-gray-600">Como será exibido para seus clientes</p>
            </div>
            
            <div class="p-6">
                <div class="flex flex-col md:flex-row gap-6">
                    <!-- QR Code Section -->
                    <div class="md:w-1/2">
                        <div class="pix-qr-code text-white mb-4">
                            <div class="flex justify-between items-start mb-4">
                                <div>
                                    <p class="text-sm opacity-80">Pague com</p>
                                    <h3 class="text-2xl font-bold">PIX</h3>
                                </div>
                                <div class="bg-white text-blue-600 px-3 py-1 rounded-full text-xs font-semibold">
                                    Expira em 29:59
                                </div>
                            </div>
                            
                            <div class="flex justify-center mb-4">
                                <div class="bg-white p-3 rounded">
                                    <!-- QR Code Placeholder -->
                                    <div class="w-48 h-48 bg-gray-200 flex items-center justify-center">
                                        <i class="fas fa-qrcode text-4xl text-gray-400"></i>
                                    </div>
                                </div>
                            </div>
                            
                            <p class="text-center text-sm opacity-90 mb-4">Escaneie o QR Code com o app do seu banco</p>
                            
                            <div class="flex justify-center space-x-3">
                                <button class="px-4 py-2 bg-white text-blue-600 rounded-md text-sm font-medium">
                                    <i class="fas fa-mobile-alt mr-2"></i> Abrir App
                                </button>
                                <button class="px-4 py-2 bg-white text-blue-600 rounded-md text-sm font-medium">
                                    <i class="fas fa-download mr-2"></i> Baixar QR Code
                                </button>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Payment Info Section -->
                    <div class="md:w-1/2">
                        <h3 class="text-lg font-semibold mb-3">Informações do Pagamento</h3>
                        
                        <div class="bg-gray-50 rounded-lg p-4 mb-4">
                            <div class="flex justify-between mb-2">
                                <span class="text-gray-600">Valor:</span>
                                <span class="font-semibold">R$ 149,90</span>
                            </div>
                            <div class="flex justify-between mb-2">
                                <span class="text-gray-600">Beneficiário:</span>
                                <span class="font-semibold">SUA EMPRESA LTDA</span>
                            </div>
                            <div class="flex justify-between">
                                <span class="text-gray-600">Chave PIX:</span>
                                <span class="font-semibold">CPF: 123.456.789-00</span>
                            </div>
                        </div>
                        
                        <div class="mb-4">
                            <label class="block text-sm font-medium text-gray-700 mb-1">Código PIX (Copiar e Colar)</label>
                            <div class="flex">
                                <input type="text" readonly value="00020126580014br.gov.bcb.pix0136123...3456789005204000053039865405159.905802BR5925SUA EMPRESA LTDA6009SAO PAULO61080540900062250521abc123def456ghi789jkl6304A1B2" class="flex-1 min-w-0 block w-full px-3 py-2 rounded-l-md border-gray-300 bg-gray-100 focus:ring-blue-500 focus:border-blue-500 text-xs">
                                <button onclick="copyToClipboard(this)" class="copy-btn inline-flex items-center px-4 py-2 bg-gray-600 text-white rounded-r-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500">
                                    <i class="fas fa-copy"></i>
                                </button>
                            </div>
                        </div>
                        
                        <div class="border-t pt-4">
                            <h4 class="text-sm font-medium text-gray-700 mb-2">Instruções:</h4>
                            <ol class="list-decimal list-inside text-sm text-gray-600 space-y-1">
                                <li>Abra o aplicativo do seu banco e selecione a opção PIX</li>
                                <li>Escaneie o QR Code ou copie o código PIX</li>
                                <li>Confira os dados e finalize o pagamento</li>
                                <li>Seu pedido será liberado automaticamente em até 2 minutos</li>
                            </ol>
                        </div>
                    </div>
                </div>
                
                <!-- Payment Status -->
                <div class="mt-6 border-t pt-6">
                    <div class="flex items-center justify-between">
                        <div class="flex items-center">
                            <div class="status-pulse mr-3">
                                <i class="fas fa-circle-notch fa-spin text-blue-500 text-xl"></i>
                            </div>
                            <div>
                                <h4 class="font-medium">Aguardando confirmação do pagamento</h4>
                                <p class="text-sm text-gray-500">O pedido será liberado automaticamente quando confirmado</p>
                            </div>
                        </div>
                        <button class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200">
                            <i class="fas fa-redo-alt mr-2"></i> Atualizar Status
                        </button>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- How It Works -->
        <div class="bg-white rounded-xl shadow-md overflow-hidden">
            <div class="p-6 border-b">
                <h2 class="text-xl font-semibold">Como o WooPIX Funciona</h2>
            </div>
            
            <div class="p-6">
                <div class="grid md:grid-cols-3 gap-6">
                    <div class="border rounded-lg p-4">
                        <div class="bg-blue-100 text-blue-600 w-12 h-12 rounded-full flex items-center justify-center mb-3">
                            <i class="fas fa-shopping-cart text-xl"></i>
                        </div>
                        <h3 class="font-semibold mb-2">1. Checkout</h3>
                        <p class="text-gray-600 text-sm">O cliente seleciona pagamento via PIX no checkout do WooCommerce.</p>
                    </div>
                    
                    <div class="border rounded-lg p-4">
                        <div class="bg-green-100 text-green-600 w-12 h-12 rounded-full flex items-center justify-center mb-3">
                            <i class="fas fa-qrcode text-xl"></i>
                        </div>
                        <h3 class="font-semibold mb-2">2. Geração do PIX</h3>
                        <p class="text-gray-600 text-sm">O plugin gera um QR Code e código PIX únicos para o pedido.</p>
                    </div>
                    
                    <div class="border rounded-lg p-4">
                        <div class="bg-purple-100 text-purple-600 w-12 h-12 rounded-full flex items-center justify-center mb-3">
                            <i class="fas fa-exchange-alt text-xl"></i>
                        </div>
                        <h3 class="font-semibold mb-2">3. Confirmação</h3>
                        <p class="text-gray-600 text-sm">O sistema verifica automaticamente o pagamento e libera o pedido.</p>
                    </div>
                </div>
                
                <div class="mt-8 bg-blue-50 border border-blue-100 rounded-lg p-4">
                    <div class="flex">
                        <div class="mr-4 text-blue-600">
                            <i class="fas fa-info-circle text-2xl"></i>
                        </div>
                        <div>
                            <h3 class="font-semibold text-blue-800 mb-1">Sobre a Liberação Automática</h3>
                            <p class="text-blue-700 text-sm">O WooPIX utiliza a API do seu provedor PIX para receber notificações em tempo real. Assim que o pagamento é confirmado, o status do pedido é atualizado automaticamente para "Processando" e os produtos digitais são liberados instantaneamente.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <script>
        function copyToClipboard(button) {
            const input = button.parentNode.querySelector('input');
            input.select();
            document.execCommand('copy');
            
            // Change button style temporarily
            button.classList.add('copied');
            button.innerHTML = '<i class="fas fa-check mr-2"></i> Copiado!';
            
            setTimeout(() => {
                button.classList.remove('copied');
                if (button.classList.contains('copy-btn')) {
                    button.innerHTML = '<i class="fas fa-copy mr-2"></i> Copiar';
                } else {
                    button.innerHTML = '<i class="fas fa-copy"></i>';
                }
            }, 2000);
        }
        
        // Simulate payment confirmation
        setTimeout(() => {
            const statusElement = document.querySelector('.status-pulse');
            if (statusElement) {
                statusElement.innerHTML = '<i class="fas fa-check-circle text-green-500 text-xl"></i>';
                statusElement.classList.remove('status-pulse');
                
                const statusText = statusElement.parentNode.querySelector('h4');
                const statusSubtext = statusElement.parentNode.querySelector('p');
                
                if (statusText) statusText.textContent = 'Pagamento confirmado!';
                if (statusSubtext) statusSubtext.textContent = 'O pedido foi liberado com sucesso.';
                
                const refreshBtn = statusElement.parentNode.parentNode.querySelector('button');
                if (refreshBtn) refreshBtn.style.display = 'none';
            }
        }, 10000);
    </script>
<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=Geovanefisio/woopix" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>