forked from NuarHaruha/ipay88
/
response.php
36 lines (33 loc) · 898 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
<?php
require_once './IPay88.class.php';
$ipay88 = new IPay88('MERCHANT_CODE', 'MERCHANT_KEY');
$response = $ipay88->getResponse();
?>
<!doctype html>
<html>
<head>
<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 print $key; ?></td>
<td><?php print $val; ?></td>
</tr>
<?php endforeach; ?>
<?php else: ?>
<tr>
<td colspan="2">No response or transaction failed.</td>
</tr>
<?php endif; ?>
</table>
</body>
</html>