-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpgResponse.php
More file actions
97 lines (82 loc) · 2.71 KB
/
pgResponse.php
File metadata and controls
97 lines (82 loc) · 2.71 KB
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
<?php
header("Pragma: no-cache");
header("Cache-Control: no-cache");
header("Expires: 0");
require_once("./lib/config_paytm.php");
require_once("./lib/encdec_paytm.php");
$paytmChecksum = "";
$paramList = array();
$isValidChecksum = "FALSE";
$paramList = $_POST;
$paytmChecksum = isset($_POST["CHECKSUMHASH"]) ? $_POST["CHECKSUMHASH"] : "";
$isValidChecksum = verifychecksum_e($paramList, PAYTM_MERCHANT_KEY, $paytmChecksum);
if($isValidChecksum == "TRUE") {
echo "<b>Checksum matched and following are the transaction details:</b>" . "<br/>";
if ($_POST["STATUS"] == "TXN_SUCCESS") {
echo "<b>Transaction status is success</b>" . "<br/>";
$status = "Payment Successful";
$message = "Thankyou For shopping with us.";
}
else {
echo "<b>Transaction status is failure</b>" . "<br/>";
$status = "Payment Failure";
}
}
else {
echo "<b>Checksum mismatched.</b>";
}
$ord = $_POST['ORDERID'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CYBERSHOP</title>
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="css/response.css">
</head>
<body>
<div class="main-container">
<div class="main-header">
<div class="logo-container">
<a href="index.html">
<img class="logo" src="img/logo.PNG" alt="">
</a>
</div>
</div>
<form action="TxnTest.php" method="POST">
<div class="sell-objects">
<div class="card-wrapper">
<div class="card">
<h1><?php $message?></h1>
<div class="card-content">
<div class=“img-view”>
<img id="img-laptop" src="img/product.jpg"/>
</div>
</div>
<div class="card-copy">
<p class="headline">DELL</p>
<h1>Dell Alienware</h1>
<h2>ORDER ID:<?php echo $ord ?></h2>
<div class="price"><?php echo $status?></div>
</div>
</div>
</div>
</div>
</form>
</div>
<footer class="main-footer">
<nav>
<ul class="main-footer__links">
<li class="main-footer__link">
<a href="#">Contact Us</a>
</li>
<li class="main-footer__link">
<a href="#">Terms of Use</a>
</li>
</ul>
</nav>
</footer>
</body>
</html>