-
Notifications
You must be signed in to change notification settings - Fork 2
/
return.php
62 lines (55 loc) · 2.28 KB
/
return.php
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
<?php
$vkey ="c6c5cdaabf772a366e1b5ba8a512afac"; //Replace xxxxxxxxxx with your MOLPay Verify Key
/********************************
*Don't change below parameters
********************************/
$tranID = isset($_POST['tranID']) ? $_POST['tranID'] : '';
$orderid = isset($_POST['orderid']) ? $_POST['orderid'] : '';
$status = isset($_POST['status']) ? $_POST['status'] : '';
$merchant = isset($_POST['domain']) ? $_POST['domain'] : '';
$amount = isset($_POST['amount']) ? $_POST['amount'] : '';
$currency = isset($_POST['currency']) ? $_POST['currency'] : '';
$appcode = isset($_POST['appcode']) ? $_POST['appcode'] : '';
$paydate = isset($_POST['paydate']) ? $_POST['paydate'] : '';
$skey = isset($_POST['skey']) ? $_POST['skey'] : ''; //Security key return by MOLPay
/***********************************************************
* To verify the data integrity sending by MOLPay
************************************************************/
$key0 = md5($tranID.$orderid.$status.$merchant.$amount.$currency);
$key1 = md5($paydate.$merchant.$key0.$appcode.$vkey);
//key1 : Security key generated on Merchant system
$verify_hash = false;
if($skey === $key1) {
$verify_hash = true;
} else if($skey != $key1) {
$verify_hash = false;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Payment Successful </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/mainCSS.css">
</head>
<body>
<?php include("navTop/navMember.php") ?>
<div style="margin-top: 50px;" align="center">
<p> Payment is Successful! Press the button and direct you to the food trackng page. <p>
<form>
<input type="button" value="Redirect Me" onclick="Redirect();" />
</form>
</div>
<script type="text/javascript">
<!--
function Redirect() {
window.location="requester.php";
}
//-->
</script>
</body>
</html>