-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathccavRequestHandler.php
More file actions
38 lines (31 loc) · 1.13 KB
/
ccavRequestHandler.php
File metadata and controls
38 lines (31 loc) · 1.13 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
<html>
<head>
<title> Iframe</title>
</head>
<body>
<center>
<?php include('Crypto.php') ?>
<?php include('accessDetails.php') ?>
<?php
error_reporting(-1);
$working_key = CCAVENUE_WORKING_KEY;
$access_code = CCAVENUE_ACCESS_CODE;
$merchant_data = '';
foreach ($_POST as $key => $value) {
$merchant_data .= $key . '=' . $value . '&';
}
$encrypted_data = encrypt($merchant_data, $working_key); // Method for encrypting the data.
$production_url = 'https://secure.ccavenue.com/transaction/transaction.do?command=initiateTransaction&encRequest=' . $encrypted_data . '&access_code=' . $access_code;
?>
<iframe src="<?php echo $production_url ?>" id="paymentFrame" width="482" height="450" frameborder="0" scrolling="No"></iframe>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
$(document).ready(function () {
window.addEventListener('message', function (e) {
$("#paymentFrame").css("height", e.data['newHeight'] + 'px');
}, false);
});
</script>
</center>
</body>
</html>