@portmone-ai/sdk-react

0.1.2 • Public • Published

Portmone React SDK

Portmone React SDK is dedicated to help the Partner to properly render the QR code that represents the data share request from Portmone.

How to install

npm i @portmone-ai/sdk-react

How to use

The usage is super simple. But as the first step the Data Share Request must be generated by the Partner.

That is achieved on the server side and consists of 2 steps:

  1. Partner authentication
  2. Data Share Request generation

Once the data share request is generated, it is provided to the SDK:

import React from 'react';
import PortmoneQRCode from '@portmone-ai/sdk-react'


class SignInPage extends React.Component {

  constructor(props) {
    super(props)
  }

  onSuccess = (id) => {
    /* TODO: Data Share Request approved by the Customer User, thus redirect ... */
  }

  render() {
    return (
      <PortmoneQRCode code={this.props.code} onSuccess={this.onSuccess} />
    );
  }
}

export default SignInPage

Readme

Keywords

none

Package Sidebar

Install

npm i @portmone-ai/sdk-react

Weekly Downloads

1

Version

0.1.2

License

none

Unpacked Size

24.9 kB

Total Files

6

Last publish

Collaborators

  • portmone