-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransfer_payment.php
More file actions
158 lines (125 loc) · 5.39 KB
/
Copy pathtransfer_payment.php
File metadata and controls
158 lines (125 loc) · 5.39 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?php
session_start();
require_once 'Paynow-PHP-SDK-master/autoloader.php';
if(isset($_POST['SubmitTransfer'])){
$InvoiceNumber = $_POST['ReferenceNumber'];
$PaymentAmount = $_POST['PaymentAmount'];
$PaymentEmail = $_POST['PaymentEmail'];
}
$paynow = new Paynow\Payments\Paynow(
'9713',
'09c5be39-7a11-47ae-8ada-a3e2488ad40b',
'http://localhost/Online-Auction-System/clintpay_success.php',
'http://localhost/Online-Auction-System/clintpay_success.php'
);
// 'http://localhost/Online-Auction-System/clintpay_success.php?inv='.$InvoiceNumber.'&ItemID='.$PaymentAmount.'&buyer='.$PaymentEmail.'',
// 'http://localhost/Online-Auction-System/clintpay_success.php?inv='.$InvoiceNumber.''
$payment = $paynow->createPayment($InvoiceNumber, $PaymentEmail);
$payment->add($InvoiceNumber, $PaymentAmount);
// ->add('Sadza and Hot Water', 20.5);
// Optionally set a description for the order.
// By default, a description is generated from the items
// added to a payment
$payment->setDescription("Transfer from Holding Account");
// Initiate a Payment
$response = $paynow->send($payment);
// var_dump($response);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="robots" content="all,follow">
<meta name="googlebot" content="index,follow,snippet,archive">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Obaju e-commerce template">
<meta name="author" content="Ondrej Svestka | ondrejsvestka.cz">
<meta name="keywords" content="">
<title>
Online Auction System
</title>
<meta name="keywords" content="">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,500,700,300,100' rel='stylesheet' type='text/css'>
<!-- styles -->
<link href="css/font-awesome.css" rel="stylesheet">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/animate.min.css" rel="stylesheet">
<link href="css/owl.carousel.css" rel="stylesheet">
<link href="css/owl.theme.css" rel="stylesheet">
<link href="css/bootstrap.css" rel="stylesheet">
<!-- theme stylesheet -->
<link href="css/style.default.css" rel="stylesheet" id="theme-stylesheet">
<!-- your stylesheet with modifications -->
<link href="css/custom.css" rel="stylesheet">
<script src="js/respond.min.js"></script>
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
</head>
<body>
<?php include 'header.php'; ?>
<div id="all">
<div id="content">
<div class="container">
<div class="col-md-12">
<ul class="breadcrumb">
<li><a href="index.php">Home</a>
</li>
<li>Transfer Payment</li>
</ul>
</div>
<div class="col-md-3">
<div class="panel panel-default sidebar-menu">
<div class="panel-heading">
<h3 class="panel-title">Quick Links</h3>
</div>
<div class="panel-body">
<ul class="nav nav-pills nav-stacked">
<li>
<a href="index.php">Home</a>
</li>
<li>
<a href="contact.php">Contact Us</a>
</li>
<li>
<a href="faq.php">FAQ</a>
</li>
</ul>
</div>
</div>
</div>
<div class="col-md-9">
<div class="box" id="contact">
<h1>Transfer Payment</h1>
<!-- <p class="lead">Please leave you feedback. We will be happy to respond! </p> -->
<hr>
<div class="panel-group" id="accordion">
<?php if(!$response->success): ?>
<h2>An error occured while communicating with Paynow</h2>
<p><?= $response->error ?></p>
<?php else: ?>
<a href="<?= $response->redirectUrl() ?>">Click here to make payment of $<?= $payment->total ?></a>
<?php endif; ?>
<?php if(isset($_GET['paynow-return'])): ?>
<script>
alert('Thank you for your payment!');
</script>
<?php endif; ?>
</div>
</div>
<!-- /.col-md-9 -->
</div>
<!-- /.container -->
</div>
</div>
<?php include 'footer.php'; ?>
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/waypoints.min.js"></script>
<script src="js/modernizr.js"></script>
<script src="js/bootstrap-hover-dropdown.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/front.js"></script>
<script src="js/bootstrap.js"></script>
</body>
</html>