@paybook/sync-widget

4.17.4 • Public • Published

Sync Widget

User friendly web interface to make use of Paybook's Sync services.

Quick Start

Installation

Sync Widget can be installed via npm. It is recommended to get Sync Widget this way.

npm install --save @paybook/sync-widget

Note: You'll need to have npm 2.7.0 or greater installed, since this library is hosted as a scoped package.

Integration

Using bundlers (Webpack)

Import styles

import "@paybook/sync-widget/dist/widget.css";

Import SyncWidget class

import SyncWidget from "@paybook/sync-widget";

Usage

Creating an instance

To create an instance of SyncWidget, you need to create an element in the DOM with a unique selector. By default SyncWidget will search for "#widget". Here's an example.

<div id="widget"></div>

Note: The widget will replace this element.

Once you have the element, you're ready to instantiate a new SyncWidget with your desired configuration.

// Any of the following formats may be used

var syncWidget = new SyncWidget("sync_token");

var syncWidget = new SyncWidget({
        token: "sync_token"
    });
    
var syncWidget = new SyncWidget({
        token: "sync_token",
        element: "#widget",
        config: {
            locale: "es", 
            entrypoint: {
                country: "MX"
            }
        }
    });

Documentation

Readme

Keywords

Package Sidebar

Install

npm i @paybook/sync-widget

Homepage

syncfy.com

Weekly Downloads

414

Version

4.17.4

License

none

Unpacked Size

3.73 MB

Total Files

7

Last publish

Collaborators

  • lalo.espinosa
  • hugo.ochoa
  • scriptrchitect
  • aldoea
  • chipims