Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
- </head>
- <body>
- <p class="text-center"><a href="" class="btn btn-info btn-lg" id="link-button"><i class="fa fa-sign-in"></i> Begin reconnection</a></p>
- <script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
- <script type="text/javascript">
- (function($) {
- var handler = Plaid.create({
- env: 'development',
- clientName: 'Plaid Quickstart',
- key: '5e94761b7052c79db62722796f2a6e',
- product: ['transactions'],
- countryCodes: ['GB'],
- token: 'public-development-b276e9cf-68a4-4739-9b36-5bac215a19f3',
- onSuccess: function(public_token, metadata) {
- //window.location.href = "https://chide-app.harryfear.co.uk/";
- alert('success');
- },
- onExit: function(err, metadata) {
- // The user exited the Link flow.
- if (err != null) {
- // The user encountered a Plaid API error prior to exiting.
- alert('error');
- }
- // metadata contains information about the institution
- // that the user selected and the most recent API request IDs.
- // Storing this information can be helpful for support.
- }
- });
- $('#link-button').on('click', function(e) {
- handler.open();
- });
- })(jQuery);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment