@readytopay/website-integration

1.2.0 • Public • Published

Ready Website Integration

npm npm bundle size

Ready Website Integration is a JavaScript library that enables our partners to show our mobile app on their website in an overlay.

Installation

A) Without NPM

Add this script to the <head> of your page:

<script src="https://unpkg.com/@readytopay/website-integration"></script>

B) With NPM

Run in your terminal:

npm i @readytopay/website-integration

Then add this script to the <head> of your page:

<script src="node_modules/@readytopay/website-integration/dist/index.js"></script>

Usage

Add the class ready-menu-btn to each HTML element that you would like to trigger the Ready Overlay. The only required attribute is data-url which should be set to the page you wish to load when the overlay appears.

Basic example

<button class="ready-menu-btn" data-url="https://ready.menu/scan/MYCODE">
  Open Overlay
</button>

With custom overlay background color

<button
  class="ready-menu-btn"
  data-url="https://ready.menu/scan/MYCODE"
  data-overlay-color="#ff0000"
>
  Open Overlay (custom background color)
</button>

With custom overlay position

data-position can be set to either left or right.

<button
  class="ready-menu-btn"
  data-url="https://ready.menu/scan/MYCODE"
  data-position="right"
>
  Open Overlay (custom position)
</button>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU GPLv3

Readme

Keywords

Package Sidebar

Install

npm i @readytopay/website-integration

Weekly Downloads

240

Version

1.2.0

License

GPL-3.0-or-later

Unpacked Size

25 kB

Total Files

10

Last publish

Collaborators

  • readytopay-pipelines
  • garett-ready