1.0.12 • Published 3 years ago

@tap-payments/benefit-pay-web-button-wrapper v1.0.12

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

benefit-pay-web-button-wrapper

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-web-button-wrapper

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

yarn add @tap-payments/benefit-pay-web-button-wrapper

Examples

ES6

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

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
1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago