0.0.2 • Published 1 year ago

@tap-payments/benefit-pay-button-element v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

@tap-payments/benefit-pay-button-element

Handling benefit pay button

Install

This is a React module available through the npm registry. Installation is done using the npm install command:

npm install @tap-payments/benefit-pay-button-element

---------------------------- OR -------------------------

yarn add @tap-payments/benefit-pay-button-element

Examples

ES6

import React from 'react'
import { createRoot } from 'react-dom/client'
import { BenefitPay } from '@tap-payments/benefit-pay-button-element'

const App = () => {
 return (
 <BenefitPay
   className='class'
   style={{ color: 'inherit' }}
   requestData={{
    merchantId: '00000101',
    transactionAmount: '10.000',
    transactionCurrency: 'BHD',
    hashedString: 'xxxxxxxxxxxxxxxxxx',
    appId: '4530082749',
    referenceNumber: '20191723',
    showResult: '0',
    hideMobileQR: '0'
   }}
   onSuccess={(response) => {
    console.log('onSuccess', response)
   }}
   onError={(error) => {
    console.log('onError', error)
   }}
   onClosed={() => {
    console.log('onClosed')
   }}
  />
 )
}

const root = createRoot(document.getElementById('root')!)
root.render(<App />)

Properties

namedescription
className optional - stringstyling BenefitPay button with classname
style optional - CSSPropertiesstyling benefit pay button with style
requestData required - objectrequest info that required by benefit pay library
onSuccess optional - funcallback fun will run after getting a success response
onError optional - funcallback fun will run after getting an error
onClosed optional - funcallback fun will run after closing benefit pay popup
0.0.2

1 year ago

0.0.1

1 year ago

0.0.2-test

1 year ago

0.0.1-test

1 year ago

0.0.0-test

1 year ago