Iniit
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.0/css/font-awesome.min.css" integrity="sha512-FEQLazq9ecqLN5T6wWq26hCZf7kPqUbFC9vsHNbXMJtSZZWAcbJspT+/NEAQkBfFReZ8r9QlA9JHaAuo28MTJA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="card w-25 shadow m-auto">
|
||||
<div class="card-body">
|
||||
<div class="text-center text-success">
|
||||
<h5 class="card-title PaymentStatus">Payment Details</h5>
|
||||
<!--<i class="fa fa-check-circle-o fa-2x "></i>-->
|
||||
</div>
|
||||
<div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>Payment Status</div>
|
||||
<div id="PaymentStatus"></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>Amount</div>
|
||||
<div id="Amount"></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>Payment Date</div>
|
||||
<div id="PaymentDate"></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>Currency Type</div>
|
||||
<div id="CurrencyType"></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>CRN</div>
|
||||
<div id="Crn"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--<div class="d-flex justify-content-center">
|
||||
<a href="#" class="btn btn-primary">Print</a>
|
||||
<a href="#" class="btn btn-primary ml-4">Cancel</a>
|
||||
</div>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function readCookie(name) {
|
||||
var nameEQ = name + "=";
|
||||
var ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
||||
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var cookie = readCookie("123");
|
||||
var bytes = CryptoJS.AES.decrypt(cookie, 'unibase');
|
||||
var plaintext = bytes.toString(CryptoJS.enc.Utf8);
|
||||
debugger;
|
||||
|
||||
var plaintextArr = plaintext.split('&');
|
||||
var dict = {
|
||||
};
|
||||
for (var i = 0; i <= plaintextArr.length-1; i++) {
|
||||
var res = plaintextArr[i].split('=');
|
||||
dict[res[0]] = res[1];
|
||||
}
|
||||
|
||||
$('#PaymentStatus').text(dict.RMK);
|
||||
$('#Amount').text(dict.AMT);
|
||||
$('#PaymentDate').text(dict.TET);
|
||||
$('#CurrencyType').text(dict.CNY);
|
||||
$('#Crn').text(dict.CRN);
|
||||
//document.getElementById("Amount").innerHTML = dict.AMT;
|
||||
//document.getElementById("PaymentDate").innerHTML = dict.TET;
|
||||
//document.getElementById("CurrencyType").innerHTML = dict.CNY;
|
||||
//document.getElementById("Crn").innerHTML = dict.CRN;
|
||||
|
||||
function setCookie(cname, cvalue, exdays) {
|
||||
|
||||
let _cookievalue = "";
|
||||
if (cvalue != null && cvalue != "")
|
||||
_cookievalue = window['CryptoJS'].AES.encrypt(cvalue, "unibase").toString();
|
||||
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires=" + d.toUTCString();
|
||||
document.cookie = cname + "=" + _cookievalue + ";" + expires + ";path=/;samesite=none;secure=true";
|
||||
}
|
||||
//var clearCookie = setCookie("123", plaintext, 1);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user