-
Notifications
You must be signed in to change notification settings - Fork 86
/
OrderTransactionRetrieve.php
69 lines (61 loc) · 2.1 KB
/
OrderTransactionRetrieve.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
<?php
/**
* OpenPayU Examples
*
* @copyright Copyright (c) PayU
* http://www.payu.com
* http://developers.payu.com
*/
require_once realpath(dirname(__FILE__)) . '/../../../lib/openpayu.php';
require_once realpath(dirname(__FILE__)) . '/../../config.php';
?>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Order Retrieve - OpenPayU v2</title>
<link rel="stylesheet" href="../../layout/css/bootstrap.min.css">
<link rel="stylesheet" href="../../layout/css/style.css">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Retrieve transaction's data - OpenPayU v2</h1>
</div>
<div id="message"></div>
<div id="unregisteredCardData">
<?php
if (isset($_POST['orderId'])) {
try {
$response = OpenPayU_Order::retrieveTransaction(stripslashes($_POST['orderId']));
echo '<div class="alert alert-success">SUCCESS</div>';
echo '<pre>';
echo '<br>';
print_r($response->getResponse());
echo '</pre>';
} catch (OpenPayU_Exception $e) {
echo '<pre>';
echo 'Error code: '.$e->getCode();
echo '<br>';
echo 'Error message: '.$e->getMessage();
echo '<br>';
echo '</pre>';
}
}?>
<form action="" method="post" class="form-horizontal">
<div class="control-group">
<label class="control-label" for="order">Order Id</label>
<div class="controls">
<input class="span3" name="orderId" id="order" type="text" value="<?php echo htmlentities($_POST['orderId']) ?>"/>
</div>
</div>
<div class="control-group">
<label class="control-label" for="pay-button"></label>
<div class="controls">
<button class="btn btn-success" id="pay-button" type="submit">Retrieve transaction's data</button>
</div>
</div>
</form>
</div>
</div>
</html>