Giter Club home page Giter Club logo

sophtron-widget-loader's Introduction

sophtron-widget-loader

This repo provides a js loader for Sophtron Widget

How to:

  • Include a distribution of this loader in your web page
    <script type="text/javascript" src="sophtron-widget-loader.js" ></script>
    or our hosted version
    <script type="text/javascript" src="https://cdn.sophtron.com/sophtron-widget-loader-0.0.0.6.min.js" ></script>
  • Init sophtron with the sophtron.init then call sophtron.show()
    sophtron.init('Add' // Actions are 'Add', 'Refresh', 'Demo', 'Mock', 'BankAuth'
        , { 
            env: 'preview', //choose an envrionment to connect to, valid options are 'prod', 'preview' 
            partner: 'default', //you can choose to provide your "Partner Name" or "default" so that we'll load your preference or default settings
            integration_key: '', // retrieve your integration_key for this session and place here
            request_id: '5f379011-ec03-4eba-b9f0-10f30c656354', // a unique string for you to identify your user session.
            inistitution_id: '', //optional, pre select a bank to skip the bank search step
            routing_number: '', //optional, pre select a bank to skip the bank search step
            userInistitution_id: '' //if action is Refresh, it's required as the id of the account being refreshed
        },
        true //optional paramter to force re-init if it's already initialized 
    );

    sophtron.show();

Example

Please refer to The example nodejs server code to start a local stub server to have a try

Avaliable api

  • sophtron.init() initialize the widget and put it to ready and hidden state
  • sophtron.show() show the widget
  • sophtron.hide() hide the widget, it hides as is, use show() to show it at the original state, this can be used to put the widget to background
  • sophtron.reload() reload the widget to its initial state, if a hide() is called for stopping a process, or simply a restart of the process is needed, call reload()
  • sophtron.destroy() remove the widget setup entirely and clean up, init() can be called again to start over afterwards
  • sophtron.state an object that stores the state information of the widget

sophtron-widget-loader's People

Contributors

jishun avatar sophtron avatar sophtron-jishun avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.