-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.html
141 lines (117 loc) · 4.27 KB
/
payment.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
a {
font-size: 17px;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script
src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
<script
src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="./scripts/productDB.js"></script>
<script src="./scripts/login.js"></script>
<script src="./scripts/payment.js"></script>
<title>Payment</title>
</head>
<body>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<a class="navbar-brand" href="#" onclick="ifJumptoShop()">Shop</a>
<ul class="navbar-nav">
<li class="nav-item" id="navigation-actions"></li>
</ul>
</nav>
<div class="jumbotron "
style="background: linear-gradient(#AD0101, #840202);">
<div class="container">
<img src="images/logo.png" style="height: 80px" /><br /> <span
style="color: white; font-size: 35px">Payment</span>
</div>
</div>
<div class="card"
style="text-align: center; width: 500px; margin-left: 500px">
<span style="font-size: 38px;">Total amount to charge:</span>
<h1 id="totalCost"></h1>
<br> <br>
<div id="ccOnFile">
<button type="button" onclick="setCard()" class="btn btn-primary" style="margin-left: 150px; width: 200px">Use Credit Card on File</button>
<br> <br>
</div>
<form action="./payment_confirmation.html"
onsubmit="return validatePayment()" method="post">
<div style="margin-left: 60px">
<span style="float: left">Credit Card Type:</span> <select id="cardType"
name="cardType" required style="float: left; width: 200px"
class="form-control">
<option value="master">Master Card</option>
<option value="visa">Visa</option>
</select>
</div>
<br /> <br />
<div style="margin-left: 60px">
<span style="float: left">Credit Card Number: </span> <input type="text" id="cardNumber"
name="creditCardNumber" required style="float: left; width: 175px" class="form-control"/>
</div>
<br/><br/>
<div style="margin-left: 60px">
<span style="float: left">Security Code: </span> <input type="text" id="cardSC"
name="securityCode" required style="float: left; width: 150px"
class="form-control"/>
</div>
<br/><br/><br/><br/>
<div style="margin-left: 60px">
<span style="float: left">Shipping Address: </span> <input type="text"
name="address" required style="float: left; width: 250px"
class="form-control"/>
</div>
<br/><br/>
<div style="margin-left: 60px">
<span style="float: left">City: </span> <input type="text"
name="city" required style="float: left; width: 150px"
class="form-control"/>
</div>
<br/><br/>
<div style="margin-left: 60px">
<span style="float: left">State: </span> <input type="text"
name="state" required style="float: left; width: 100px"
class="form-control"/>
</div>
<br/><br/>
<br> <br> <br> <input type="submit" value="Confirm"
class="btn btn-primary" /> <input type="button"
name="Submit" value="Go Back to Cart"
onclick="javascript:history.back(-1);" class="btn btn-default">
</form>
<br>
</div>
</body>
<script>
if (localStorage.getItem("email")){
// Show Profile navigation
var navigation_profile = document.createElement("a");
var element1 = document.createTextNode("My Profile");
//navigation_profile.href = './profile.html';
navigation_profile.appendChild(element1);
navigation_profile.className = "nav-link";
navigation_profile.setAttribute("onclick","ifJumptoProfile()");
let navigation_action = document.getElementById("navigation-actions");
navigation_action.appendChild(navigation_profile);
}
else{
//Show Sign In navigation
var navigation_profile = document.createElement("a");
var element1 = document.createTextNode("Sign In");
navigation_profile.href = './login.html';
navigation_profile.appendChild(element1);
navigation_profile.className = "nav-link";
let navigation_action = document.getElementById("navigation-actions");
navigation_action.appendChild(navigation_profile);
}
</script>
</html>