0.0.2 • Published 2 months ago

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

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

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

Handling careem 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/careem-pay-button-element

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

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

Examples

ES6

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

const App = () => {
 return (

<CareemPay
			environment='sandbox'
      className='class'
      style={{ color: 'inherit' }}
			onPrepareRequestData={()=>({ inoviceId:'0000', orderId:'0000' })}
			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
environment required - enumadd CareemPay environment and could be sandbox or production
hideHint optional - booleanflag to hide the hint that appear under CareemPay button
className optional - stringstyling CareemPay button with classname
style optional - CSSPropertiesstyling careem pay button with style
onSuccess optional - funcallback fun will run after getting a success response
onPrepareRequestData required - funcallback fun will run after click pay button and getting careem pay configurations object
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 careem pay popup
0.0.2

2 months ago

0.0.1

1 year ago

0.0.12-test

1 year ago

0.0.11-test

1 year ago

0.0.10-test

1 year ago

0.0.9-test

1 year ago

0.0.7-test

1 year ago

0.0.6-test

1 year ago

0.0.5-test

1 year ago

0.0.4-test

1 year ago

0.0.3-test

1 year ago

0.0.2-test

1 year ago

0.0.1-test

1 year ago

0.0.0-test

1 year ago