-
Notifications
You must be signed in to change notification settings - Fork 4
/
transaction.php
110 lines (103 loc) · 3.59 KB
/
transaction.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
include_once 'layout/head.php';
include_once 'layout/header.php';
include_once 'endpoints/getToken.php';
$ch = curl_init();
$id = isset($_GET['id'])?$_GET['id']:null;
curl_setopt($ch, CURLOPT_URL, "https://topups.reloadly.com/topups/reports/transactions/".$id);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type:application/json",
"Authorization: Bearer ".$tokenResponse->access_token
));
$response = curl_exec($ch);
curl_close($ch);
$transaction = json_decode($response);
?>
<main role="main" class="flex-shrink-0">
<div class="container pt-5 mt-5">
<div class="col">
<div class="mb-2 row justify-content-center">
<h2>Transaction Description</h2>
</div>
<table class="table">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>transactionId :</td>
<td><?=$transaction->transactionId?></td>
</tr>
<tr>
<td>operatorTransactionId :</td>
<td><?=$transaction->operatorTransactionId?></td>
</tr>
<tr>
<td>customIdentifier :</td>
<td><?=$transaction->customIdentifier?></td>
</tr>
<tr>
<td>recipientPhone :</td>
<td><?=$transaction->recipientPhone?></td>
</tr>
<tr>
<td>senderPhone :</td>
<td><?=$transaction->senderPhone?></td>
</tr>
<tr>
<td>countryCode :</td>
<td><?=$transaction->countryCode?></td>
</tr>
<tr>
<td>operatorId :</td>
<td><?=$transaction->operatorId?></td>
</tr>
<tr>
<td>operatorName :</td>
<td><?=$transaction->operatorName?></td>
</tr>
<tr>
<td>discount :</td>
<td><?=$transaction->discount?></td>
</tr>
<tr>
<td>discountCurrencyCode :</td>
<td><?=$transaction->discountCurrencyCode?></td>
</tr>
<tr>
<td>requestedAmount :</td>
<td><?=$transaction->requestedAmount?></td>
</tr>
<tr>
<td>requestedAmountCurrencyCode :</td>
<td><?=$transaction->requestedAmountCurrencyCode?></td>
</tr>
<tr>
<td>deliveredAmount :</td>
<td><?=$transaction->deliveredAmount?></td>
</tr>
<tr>
<td>deliveredAmountCurrencyCode :</td>
<td><?=$transaction->deliveredAmountCurrencyCode?></td>
</tr>
<tr>
<td>transactionDate :</td>
<td><?=$transaction->transactionDate?></td>
</tr>
<tr>
<td>pinDetail :</td>
<td><?=json_encode($transaction->pinDetail)?></td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
<?php
include_once 'layout/footer.php';
?>