-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
34 lines (29 loc) · 1.01 KB
/
index.html
File metadata and controls
34 lines (29 loc) · 1.01 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
<!DOCTYPE html>
<html>
<head>
<title>Google Wallet Codelab</title>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script>
window.addEventListener('load', function() {
document.getElementById('form').addEventListener('submit', function(e) {
e.preventDefault();
fetch('wallet.php', {
method: 'POST'
}).then(function(res) {
return res.text();
}).then(function(saveUrl) {
window.location.href = saveUrl;
});
});
});
</script>
<meta name="google-signin-client_id" content=""> //put your client_id here
</head>
<body>
<div id="content">
<form id="form" action="{}" method="post">
<input type="image" src="wallet-button.png" alt="Create pass" id="submitImage" style="width: 500px; cursor: pointer;">
</form>
</div>
</body>
</html>