harryfear

Untitled

Mar 16th, 2020
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1.  
  2. <!DOCTYPE html>
  3. <html lang="en">
  4.  
  5. <head>
  6.  
  7.  
  8. <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
  9.  
  10. </head>
  11.  
  12. <body>
  13.  
  14.  
  15. <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>
  16.  
  17.  
  18. <script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>
  19. <script type="text/javascript">
  20. (function($) {
  21. var handler = Plaid.create({
  22. env: 'development',
  23. clientName: 'Plaid Quickstart',
  24. key: '5e94761b7052c79db62722796f2a6e',
  25. product: ['transactions'],
  26. countryCodes: ['GB'],
  27. token: 'public-development-b276e9cf-68a4-4739-9b36-5bac215a19f3',
  28. onSuccess: function(public_token, metadata) {
  29. //window.location.href = "https://chide-app.harryfear.co.uk/";
  30. alert('success');
  31. },
  32. onExit: function(err, metadata) {
  33. // The user exited the Link flow.
  34. if (err != null) {
  35. // The user encountered a Plaid API error prior to exiting.
  36. alert('error');
  37. }
  38. // metadata contains information about the institution
  39. // that the user selected and the most recent API request IDs.
  40. // Storing this information can be helpful for support.
  41. }
  42. });
  43.  
  44. $('#link-button').on('click', function(e) {
  45. handler.open();
  46. });
  47. })(jQuery);
  48. </script>
  49.  
  50.  
  51. </body>
  52.  
  53. </html>
Advertisement
Add Comment
Please, Sign In to add comment