-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfastlink.php
51 lines (46 loc) · 1.35 KB
/
fastlink.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
40
41
42
43
44
45
46
47
48
49
50
51
<?php
$jwtToken = 'xxx'; // REDACTED
$fastLinkURL = 'https://ukyinode.stage.yodleedeveloper.uk/authenticate/xxx/?channelAppName=xxx'; // REDACTED
?>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
</head>
<script type='text/javascript' src='https://cdn.yodlee.com/fastlink/v3/initialize.js'></script>
<body>
<div id="container-fastlink">
<div style="text-align: center;">
<input type="submit" id="btn-fastlink" value="Link an Account">
</div>
</div>
<script>
(function (window) {
//Open FastLink
var fastlinkBtn = document.getElementById('btn-fastlink');
fastlinkBtn.addEventListener('click', function() {
window.fastlink.open({
fastLinkURL: '<?php echo $fastLinkURL; ?>',
jwtToken: 'Bearer <?php echo $jwtToken; ?> ',
params: {
userExperienceFlow : 'Aggregation'
},
onSuccess: function (data) {
console.log(data);
},
onError: function (data) {
console.log(data);
},
onExit: function (data) {
console.log(data);
},
onEvent: function (data) {
console.log(data);
}
},
'container-fastlink');
},
false);
}(window));
</script>
</body>