-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·301 lines (279 loc) · 23.3 KB
/
index.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<?php
?>
<!--
Based on:
https://azmind.com/bootstrap-wizard/
https://github.com/stripe/elements-examples/#example-5
http://www.larryullman.com/series/processing-payments-with-stripe/
https://stripe.com/docs/billing/subscriptions/payment
https://stripe.com/docs/api/errors/handling
https://stripe.com/docs/testing#cards
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Signup</title>
<!-- CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,100,300,500">
<link rel="stylesheet" href="public/dist/app_signup.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Favicon and touch icons -->
<link rel="shortcut icon" href="public/icons/favicon.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="public/icons/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="public/icons/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="public/icons/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="public/icons/apple-touch-icon-57-precomposed.png">
<script src="https://js.stripe.com/v3/"></script>
<!-- Javascript -->
<?php
// Uses STRIPE_PUBLIC_KEY from the environment.
echo "<script type=\"text/javascript\">var stripe = Stripe(\"" . getenv('STRIPE_PUBLIC_KEY') . "\");</script>\n";
?>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<!-- http://imulus.github.io/retinajs/ -->
<script src="public/vendors/js/retina-1.3.0/retina.min.js"></script>
<!-- https://www.jquery-backstretch.com/ https://cdnjs.com/libraries/jquery-backstretch -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-backstretch/2.0.4/jquery.backstretch.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/4.4.2/zxcvbn.js"></script>
<script src="public/dist/app.js"></script>
<!-- Simple localization script for Stripe's examples page. -->
<script src="public/vendors/js/l10n.js" data-rel-js></script>
<!--[if lt IE 10]>
<script src="public/vendors/js/placeholder.js"></script>
<![endif]-->
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Quicksand" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
</head>
<body>
<!-- Top menu -->
<!-- Light menu: navbar-light bg-faded Dark menu: navbar-dark bg-dark navbar-no-bg -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark navbar-no-bg" role="navigation">
<div class="container-fluid">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#top-navbar-1" aria-controls="top-navbar-1" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html">Signup Example</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="top-navbar-1">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<span class="li-text">
Put some text or
</span>
<a class="nav-link" href="#"><strong>links</strong></a>
<span class="li-text">
here, or some icons:
</span>
<span class="li-social">
<a href="https://getqor.com/" target="_blank"><i class="fab fa-facebook"></i></a>
<a href="https://getqor.com/" target="_blank"><i class="fab fa-twitter"></i></a>
<a href="https://getqor.com/" target="_blank"><i class="fab fa-instagram"></i></a>
<a href="https://github.com/qor/qor-example" target="_blank"><i class="fab fa-github"></i></a>
</span>
</li>
</ul>
</div>
</div>
</nav>
<!-- Top content -->
<div class="top-content">
<main>
<section class="container">
<div class="row">
</div>
<div class="row">
<div class="col-md-10 offset-sm-1 col-lg-8 offset-md-2 col-xl-6 offset-lg-3 form-box">
<form role="form" action="signup.php" method="post" class="f1">
<h3>Register</h3>
<div class="f1-steps">
<div class="f1-progress">
<div class="f1-progress-line" data-now-value="16.66" data-number-of-steps="4" style="width: 16.66%;"></div>
</div>
<div class="f1-step active">
<div class="f1-step-icon" data-toggle="tooltip" title="about"><i class="fa fa-user"></i></div>
</div>
<div class="f1-step">
<div class="f1-step-icon" data-toggle="tooltip" title="phone"><i class="fa fa-phone"></i></div>
</div>
<div class="f1-step">
<div class="f1-step-icon" data-toggle="tooltip" title="account"><i class="fa fa-key"></i></div>
</div>
<div class="f1-step">
<div class="f1-step-icon" data-toggle="tooltip" title="payment"><i class="fab fa-cc-stripe"></i></div>
</div>
</div>
<fieldset>
<div class="form-group">
<label class="sr-only" for="f1-first-name">First name</label>
<input type="text" name="f1-first-name" placeholder="First name..." class="f1-first-name form-control" id="f1-first-name">
</div>
<div class="form-group">
<label class="sr-only" for="f1-middle-name">Middle name</label>
<input type="text" name="f1-middle-name" placeholder="Middle name..." class="f1-middle-name form-control" id="f1-middle-name">
</div>
<div class="form-group">
<label class="sr-only" for="f1-last-name">Last name</label>
<input type="text" name="f1-last-name" placeholder="Last name..." class="f1-last-name form-control" id="f1-last-name">
</div>
<div class="f1-buttons">
<button type="button" class="btn btn-next">Next</button>
</div>
</fieldset>
<fieldset>
<div class="form-group">
<label class="sr-only" for="f1-mobile-number">Mobile phone number...</label>
<input type="text" name="f1-mobile-number" placeholder="Mobile phone number..." class="f1-mobile-number form-control" id="f1-mobile-number">
</div>
<div class="form-group">
<label class="sr-only" for="f1-home-number">Home phone number...</label>
<input type="text" name="f1-home-number" placeholder="Home phone number..." class="f1-home-number form-control" id="f1-home-number">
</div>
<div class="form-group">
<label class="sr-only" for="f1-work-number">Middle name</label>
<input type="text" name="f1-work-number" placeholder="Work phone number..." class="f1-work-number form-control" id="f1-work-number">
</div>
<div class="f1-buttons">
<button type="button" class="btn btn-previous">Previous</button>
<button type="button" class="btn btn-next">Next</button>
</div>
</fieldset>
<fieldset>
<div class="form-group">
<label class="sr-only" for="f1-plan">Plan</label>
<select name="f1-plan" class="f1-plan form-control" id="f1-plan">
<?php
// TODO: In production, read the values from a database
$strPlans = file_get_contents("plans.json");
$arrayPlans = json_decode($strPlans, true);
//var_dump($arrayPlans);
$selected = "selected";
foreach ($arrayPlans as $key => $value) {
echo "<option label=\"$value\" $selected>$key</option>\n";
$selected="";
}
?>
</select>
</div>
<div class="form-group">
<label class="sr-only" for="f1-email">Email</label>
<input type="text" name="f1-email" placeholder="Email..." class="f1-email form-control" id="f1-email">
</div>
<div class="form-group">
<label class="sr-only" for="f1-password">Password</label>
<input type="password" name="f1-password" placeholder="Password..." class="f1-password form-control" id="f1-password">
</div>
<div class="form-group">
<label class="sr-only" for="f1-repeat-password">Repeat password</label>
<input type="password" name="f1-repeat-password" placeholder="Repeat password..."
class="f1-repeat-password form-control" id="f1-repeat-password">
</div>
<div class="f1-buttons">
<button type="button" class="btn btn-previous">Previous</button>
<button type="button" class="btn btn-next">Next</button>
</div>
</fieldset>
<fieldset>
<div class="payment">
<div id="payment-paymentRequest">
<!--Stripe paymentRequestButton Element inserted here-->
</div>
<div class="payment-request-available">
</div>
<div class="form-group">
<div class="div__payment-name bordered-bottom">
<label class="sr-only" for="payment-name">Name</label>
<input id="payment-name" class="input" type="text" placeholder="Name..." required="" autocomplete="name">
</div>
</div>
<div class="form-group bordered-bottom">
<div class="div__payment-email">
<label class="sr-only" for="payment-email">Email</label>
<input id="payment-email" name="payment-email" class="input" type="text" placeholder="Email..." required="" autocomplete="email">
</div><div class="div__payment-phone bordered-left">
<label class="sr-only" for="payment-phone">Phone</label>
<input id="payment-phone" name="payment-phone" class="input" type="text" placeholder="Phone number..." required="" autocomplete="tel">
</div>
</div>
<div data-locale-reversible>
<div class="form-group">
<div class="div__payment-name bordered-bottom">
<label class="sr-only" for="payment-address">Address</label>
<input id="payment-address" class="input" type="text" placeholder="Address..." required="" autocomplete="address-line1">
</div>
</div>
<div class="form-group bordered-bottom" data-locale-reversible>
<div class="div__payment-city">
<label class="sr-only" for="payment-city">City</label>
<input id="payment-city" class="input" type="text" placeholder="City..." required="" autocomplete="address-level2">
</div><div class="div__payment-state bordered-left">
<label class="sr-only" for="payment-state">State</label>
<input id="payment-state" class="input empty" type="text" placeholder="State..." required="" autocomplete="address-level1">
</div><div class="div__payment-zip bordered-left">
<label class="sr-only" for="payment-zip">ZIP</label>
<input id="payment-zip" class="input empty" type="text" placeholder="Zip..." required="" autocomplete="postal-code">
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="sr-only" for="payment-card">Card</label>
<div id="payment-card" class="input"></div>
</div>
<div class="f1-buttons">
<button type="button" class="btn btn-previous">Previous</button>
<button type="submit" class="btn btn-submit">Sign Up</button>
<input type="hidden" name="stripeToken" value="" />
</div>
</fieldset>
<div class="error" role="alert"><svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 17 17">
<path class="base" fill="#000" d="M8.5,17 C3.80557963,17 0,13.1944204 0,8.5 C0,3.80557963 3.80557963,0 8.5,0 C13.1944204,0 17,3.80557963 17,8.5 C17,13.1944204 13.1944204,17 8.5,17 Z"></path>
<path class="glyph" fill="#FFF" d="M8.5,7.29791847 L6.12604076,4.92395924 C5.79409512,4.59201359 5.25590488,4.59201359 4.92395924,4.92395924 C4.59201359,5.25590488 4.59201359,5.79409512 4.92395924,6.12604076 L7.29791847,8.5 L4.92395924,10.8739592 C4.59201359,11.2059049 4.59201359,11.7440951 4.92395924,12.0760408 C5.25590488,12.4079864 5.79409512,12.4079864 6.12604076,12.0760408 L8.5,9.70208153 L10.8739592,12.0760408 C11.2059049,12.4079864 11.7440951,12.4079864 12.0760408,12.0760408 C12.4079864,11.7440951 12.4079864,11.2059049 12.0760408,10.8739592 L9.70208153,8.5 L12.0760408,6.12604076 C12.4079864,5.79409512 12.4079864,5.25590488 12.0760408,4.92395924 C11.7440951,4.59201359 11.2059049,4.59201359 10.8739592,4.92395924 L8.5,7.29791847 L8.5,7.29791847 Z"></path>
</svg>
<span class="message"></span>
</div>
</form>
<div class="success">
<div class="icon">
<svg width="84px" height="84px" viewBox="0 0 84 84" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle class="border" cx="42" cy="42" r="40" stroke-linecap="round" stroke-width="4" stroke="#000" fill="none"></circle>
<path class="checkmark" stroke-linecap="round" stroke-linejoin="round" d="M23.375 42.5488281 36.8840688 56.0578969 64.891932 28.0500338" stroke-width="4" stroke="#000" fill="none"></path>
</svg>
</div>
<h3 class="title" data-tid="signup.success.title">Payment successful</h3>
<p class="message"><span data-tid="signup.success.message">Thanks for trying Stripe Elements. No money was charged, but we generated a token: </span><span class="token"></span></p>
<a class="reset" href="#">
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path fill="#000000" d="M15,7.05492878 C10.5000495,7.55237307 7,11.3674463 7,16 C7,20.9705627 11.0294373,25 16,25 C20.9705627,25 25,20.9705627 25,16 C25,15.3627484 24.4834055,14.8461538 23.8461538,14.8461538 C23.2089022,14.8461538 22.6923077,15.3627484 22.6923077,16 C22.6923077,19.6960595 19.6960595,22.6923077 16,22.6923077 C12.3039405,22.6923077 9.30769231,19.6960595 9.30769231,16 C9.30769231,12.3039405 12.3039405,9.30769231 16,9.30769231 L16,12.0841673 C16,12.1800431 16.0275652,12.2738974 16.0794108,12.354546 C16.2287368,12.5868311 16.5380938,12.6540826 16.7703788,12.5047565 L22.3457501,8.92058924 L22.3457501,8.92058924 C22.4060014,8.88185624 22.4572275,8.83063012 22.4959605,8.7703788 C22.6452866,8.53809377 22.5780351,8.22873685 22.3457501,8.07941076 L22.3457501,8.07941076 L16.7703788,4.49524351 C16.6897301,4.44339794 16.5958758,4.41583275 16.5,4.41583275 C16.2238576,4.41583275 16,4.63969037 16,4.91583275 L16,7 L15,7 L15,7.05492878 Z M16,32 C7.163444,32 0,24.836556 0,16 C0,7.163444 7.163444,0 16,0 C24.836556,0 32,7.163444 32,16 C32,24.836556 24.836556,32 16,32 Z"></path>
</svg>
</a>
</div>
<div class="caption">
<span data-tid="signup.caption.no_charge" class="no-charge">Your card won't be charged</span>
<a class="source" href="https://github.com/stripe/elements-examples/#example-5">
<svg width="16px" height="10px" viewBox="0 0 16 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path d="M1,8 L12,8 C12.5522847,8 13,8.44771525 13,9 C13,9.55228475 12.5522847,10 12,10 L1,10 C0.44771525,10 6.76353751e-17,9.55228475 0,9 C-6.76353751e-17,8.44771525 0.44771525,8 1,8 L1,8 Z M1,4 L8,4 C8.55228475,4 9,4.44771525 9,5 C9,5.55228475 8.55228475,6 8,6 L1,6 C0.44771525,6 6.76353751e-17,5.55228475 0,5 C-6.76353751e-17,4.44771525 0.44771525,4 1,4 L1,4 Z M1,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,1 C16,1.55228475 15.5522847,2 15,2 L1,2 C0.44771525,2 6.76353751e-17,1.55228475 0,1 L0,1 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L1,0 Z" fill="#AAB7C4"></path>
</svg>
<span data-tid="signup.caption.view_source">View source on GitHub</span>
</a>
</div>
</div>
</div>
</section>
</main>
</div>
</body>
</html>