-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.php
159 lines (147 loc) · 6.12 KB
/
payment.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
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
159
<?php
include("function/session.php");
include("db/dbconn.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>Online Shoe Store</title>
<link rel="icon" href="img/logo.jpg" />
<link rel = "stylesheet" type = "text/css" href="css/style.css" media="all">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<script src="js/bootstrap.js"></script>
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/carousel.js"></script>
<script src="js/button.js"></script>
<script src="js/dropdown.js"></script>
<script src="js/tab.js"></script>
<script src="js/tooltip.js"></script>
<script src="js/popover.js"></script>
<script src="js/collapse.js"></script>
<script src="js/modal.js"></script>
<script src="js/scrollspy.js"></script>
<script src="js/alert.js"></script>
<script src="js/transition.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div id="header">
<img src="img/logo.jpg">
<label>Online Shoe Store</label>
<?php
$id = (int) $_SESSION['id'];
$query = $conn->query ("SELECT * FROM customer WHERE customerid = '$id' ") or die (mysql_error());
$fetch = $query->fetch_array ();
?>
<ul>
<li><a href="function/logout.php"><i class="icon-off icon-white"></i>logout</a></li>
<li>Welcome: <a href="#profile" href data-toggle="modal"><i class="icon-user icon-white"></i><?php echo $fetch['firstname']; ?> <?php echo $fetch['lastname'];?></a></li>
</ul>
</div>
<div id="profile" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:700px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
<h3 id="myModalLabel">My Account</h3>
</div>
<div class="modal-body">
<?php
$id = (int) $_SESSION['id'];
$query = $conn->query ("SELECT * FROM customer WHERE customerid = '$id' ") or die (mysqli_error());
$fetch = $query->fetch_array ();
?>
<center>
<form method="post">
<center>
<table>
<tr>
<td class="profile">Name:</td><td class="profile"><?php echo $fetch['firstname'];?> <?php echo $fetch['mi'];?> <?php echo $fetch['lastname'];?></td>
</tr>
<tr>
<td class="profile">Address:</td><td class="profile"><?php echo $fetch['address'];?></td>
</tr>
<tr>
<td class="profile">Country:</td><td class="profile"><?php echo $fetch['country'];?></td>
</tr>
<tr>
<td class="profile">ZIP Code:</td><td class="profile"><?php echo $fetch['zipcode'];?></td>
</tr>
<tr>
<td class="profile">Mobile Number:</td><td class="profile"><?php echo $fetch['mobile'];?></td>
</tr>
<tr>
<td class="profile">Telephone Number:</td><td class="profile"><?php echo $fetch['telephone'];?></td>
</tr>
<tr>
<td class="profile">Email:</td><td class="profile"><?php echo $fetch['email'];?></td>
</tr>
</table>
</center>
</div>
<div class="modal-footer">
<a href="account.php?id=<?php echo $fetch['customerid']; ?>"><input type="button" class="btn btn-success" name="edit" value="Edit Account"></a>
<button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</form>
</div>
<br>
<div id="container">
<div class="nav">
<ul>
<li><a href="home.php"> <i class="icon-home"></i>Home</a></li>
<li><a href="product1.php"> <i class="icon-th-list"></i>Product</a></li>
<li><a href="aboutus1.php"> <i class="icon-bookmark"></i>About Us</a></li>
<li><a href="contactus1.php"><i class="icon-inbox"></i>Contact Us</a></li>
<li><a href="privacy1.php"><i class="icon-info-sign"></i>Privacy Policy</a></li>
<li><a href="faqs1.php"><i class="icon-question-sign"></i>FAQs</a></li>
</ul>
</div>
<br>
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<!-- the cmd parameter is set to _xclick for a Buy Now button -->
<?php
$cusid=$_POST['cusid'];
$total=$_POST['total'];
$time=$_POST['time'];
$portal=$_POST['portal'];
$distination=$_POST['distination'];
$transactioncode=$_POST['transactioncode'];
if($portal=='Pick-Up'){
$charge=0;
}
if($portal=='Delivery'){
$charge=50;
}
if($distination=='City Proper'){
$charge1=0;
}
if($distination=='Outside City'){
$charge1=50;
}
$totalcharge=$charge+$charge1;
$grandtotal=$totalcharge+$total;
?>
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="[email protected]" />
<input type="hidden" name="item_name" value="<?php echo $cusid; ?>" />
<input type="hidden" name="item_number" value="<?php echo $transactioncode; ?>" />
<input type="hidden" name="amount" value="<?php echo $grandtotal; ?>" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="currency_code" value="PHP" />
<input type="hidden" name="lc" value="GB" />
<input type="hidden" name="bn" value="PP-BuyNowBF" /><br />
<div style="margin:0 auto; width:50px;">
<input type="image" src="images/button.jpg" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
<img alt="fdff" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
</div>
<!-- Payment confirmed -->
<input type="hidden" name="return" value="http://mammamarias.elementfx.com/showconfirm.php" />
<!-- Payment cancelled -->
<input type="hidden" name="cancel_return" value="http://mammamarias.elementfx.com/cancel.php" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="notify_url" value="http://mammamarias.elementfx.com/ipn.php" />
<input type="hidden" name="custom" value="any other custom field you want to pass" />
</form>
</div>
</body>
</html>