-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
39 lines (38 loc) · 884 Bytes
/
index.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
<?php
require 'vendor/autoload.php';
require 'braintree-credentials.php';
$clientToken = Braintree_ClientToken::generate();
?>
<html>
<head>
<title>My Fast Shop with PHP & Braintree</title>
<style>
div {
margin-left: 30%;
}
h1 {
margin-left: 25%;
}
img {
width: 20%;
height: 35%;
}
</style>
</head>
<body>
<h1>Buy this Awesome Car!!</h1>
<div id='divImg'><img src='https://pbs.twimg.com/media/B9crMEeCcAAiOjw.jpg' width='15%' height='10%'></div>
<br /><br />
<form action="checkout.php" method="post">
<div id='divCheckout'></div>
<br /><br />
<div id="divButton"><input type="submit" value="It's only $100" /></div>
</form>
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script>
braintree.setup( '<?=$clientToken?>',
'dropin',
{ container : 'divCheckout'});
</script>
</body>
</html>