forked from cchitsiang/ipay88
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresponse.php
43 lines (34 loc) · 932 Bytes
/
response.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
<?php
require_once 'IPay88.class.php';
$ipay88 = new IPay88(/*YOUR_MERCHANT_CODE*/);
$response = $ipay88->getResponse();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>iPay88 - Test - Response</title>
</head>
<body>
<h1>iPay88 payment gateway</h1>
<?php if ($response['status']): ?>
<p>Your transaction was successful.</p>
<?php else: ?>
<p>Your transaction failed.</p>
<?php endif; ?>
<table>
<?php if ($response): ?>
<?php foreach ($response['data'] as $key => $val): ?>
<tr>
<td><?php echo $key; ?></td>
<td><?php echo $val; ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="2">No response or transaction failed.</td>
</tr>
<?php endif; ?>
</table>
</body>
</html>