@tap-payments/careem-pay-button-element
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@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

name description
environment required - enum add CareemPay environment and could be sandbox or production
hideHint optional - boolean flag to hide the hint that appear under CareemPay button
className optional - string styling CareemPay button with classname
style optional - CSSProperties styling careem pay button with style
onSuccess optional - fun callback fun will run after getting a success response
onPrepareRequestData required - fun callback fun will run after click pay button and getting careem pay configurations object
onSuccess optional - fun callback fun will run after getting a success response
onError optional - fun callback fun will run after getting an error
onClosed optional - fun callback fun will run after closing careem pay popup

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

79

Version

0.0.2

License

ISC

Unpacked Size

19.6 kB

Total Files

18

Last publish

Collaborators

  • mostafaabobakr.tap
  • i.mousa
  • mahmoudallam
  • aya_tap
  • mud_fahmi
  • ahmedkaram-tap
  • haitham-tap
  • muhammadazhar007
  • elsharkawy
  • waqast
  • hala.q
  • reham_alsabbagh
  • kalpanatap
  • sadbarkhattak