@portmone-ai/sdk-react
v0.1.2
Published
Portmone React SDK is dedicated to help the Partner to properly render the QR code that represents the data share request from Portmone.
Downloads
12
Readme
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:
- Partner authentication
- 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