Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rm-plugin

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rm-plugin

##### Support for Merchant App, Terminal and Merchant Portal

  • 0.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
3
Weekly downloads
 
Created
Source

RM Plugin SDK npm

Support for Merchant App, Terminal and Merchant Portal

Install

$ npm install rm-plugin

Usage

import rm from 'rm-plugin';

// get signed request
rm.getSignedRequest({
    success: function({ signedRequest, platform }) {
        console.log('signedRequest: ', signedRequest, ' platform: ', platform);
    }
});

// get platform
const platform = rm.getPlatform();

// show toast message
rm.showToast({
    type: 'success', // success, error (only for web portal)
    title: 'hello'
})

// scan qrcode (only for terminal and merchant-app)
rm.scanCode({
    success: function(resp) {
        console.log('success: ', resp.code)
    },
    fail: function() {
        console.log('failed')
    },
    complete: function() {
        console.log('complete')
    }
})

// show loading
rm.showLoading();

// hide loading
rm.hideLoading();

// show alert (only for terminal and merchant-app)
rm.showAlert({
    type: 'success', // success, error
    title: 'hello world'
})

// print receipt (only for terminal)
rm.printReceipt({
    data: {} // object
})

// show navbar title (only for terminal and merchant-app)
rm.setBarTitle({
    title: 'hello world'
})

// set storage by key and value
rm.setStorage({
    key: 'test',
    value: 'token',
})

// get storage by key name
rm.getStorage({
    key: 'test',
    success: function({ data }) {
        console.log("content", data);
    }
})

Keywords

FAQs

Package last updated on 10 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc