-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
67 lines (42 loc) · 1.26 KB
/
index.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
62
63
64
65
66
<?php
include 'backend.php';
?>
<html>
<head>
<script>
function responseCallBack(e){
if(e.data.message== "success"){
console.log("Success payment", e.data )
}else if(e.data.message == "failure"){
console.log("Failure payment", e.data )
}else{
console.log("Other Actions", e.data )
}
}
if (window.addEventListener) {
console.log("if");
addEventListener("message", responseCallBack, false)
} else {
console.log("else");
attachEvent("onmessage", responseCallBack)
}
</script>
</head>
<body>
<a target="_blank" href="<?php echo $hppUrl ?>"> Click to check Hosted Payment Page Form </a>
<script id="kashier-iFrame"
src="<?php echo $order->baseUrl ?>/kashier-checkout.js"
data-amount="<?php echo $order->amount ?>"
data-description="some description"
data-hash="<?php echo $hash ?>"
data-currency="<?php echo $order->currency ?>"
data-orderId="<?php echo $order->merchantOrderId ?>"
data-merchantId="<?php echo $order->mid ?>"
data-allowedMethods="<?php echo $order->allowedMethods ?>"
data-merchantRedirect="http://localhost/Php-Checkout-Demo/iFrameCallback.php"
data-mode="<?php echo $order->mode ?>"
data-store = "Qassat"
data-type = "external"
data-display="en" > </script>
</body>
</html>