-
Notifications
You must be signed in to change notification settings - Fork 230
/
link.html
43 lines (42 loc) · 2.07 KB
/
link.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
<html>
<!--=================================================
STYLES AND PAGE INSTRUCTIONS. IGNORE THIS STUFF
=================================================-->
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap" rel="stylesheet">
<style>
.outer { justify-self: center; margin: 20% auto 120px auto; width: 60%; ; font-family: 'Roboto', sans-serif;} a { text-decoration: underline; } li { padding-left: 1rem;}
</style>
</head>
<body style="background-color:#B1EEFC;">
<div class="outer">
This HTML file is designed to be used with Plaid's <a href="https://github.com/plaid/plaid-postman">Postman Collection</a>. Please note the "Link Account" button below will not work until you've followed the steps in the <a href="https://github.com/plaid/plaid-postman">README</a>.
<button id="link-button" style="background-color: white;border: #0A85EA;color: black;padding: 12px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;margin: 4px 2px;box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19)">Link Account</button>
</div>
<!--=================================================
PLAID SCRIPTS. HERE'S THE STUFF YOU'LL EDIT!
=================================================-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
<script type="text/javascript">
(function($) {
var handler = Plaid.create({
token: 'your-link-token-goes-here',
onSuccess: function(public_token, metadata) {
console.log('public token is:', public_token);
},
onExit: function(err, metadata) {
console.log('onexit invoked');
},
onEvent: function(eventName, metadata) {
console.log('event name is:', eventName);
}
});
$('#link-button').on('click', function(e) { handler.open() });
})(jQuery);
</script>
</body>
</html>