me-paas-sdk-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

me-paas-sdk-react

NPM JavaScript Style Guide

Install

npm install --save me-paas-sdk-react

Usage

import React from 'react'

import { payWithMePaas } from 'me-paas-sdk-react'

const App = () => {
  const handlePaymentClick = () => {
    payWithMePaas({
      apiKey: 'ro2a6ajkavja4i0uhui41i',
      amount: '500',
      email: 'test@example.com',
      onSuccess: (taskId) => {
        console.log('Payment Success, transactionId:', taskId)
      },
      onError: (message) => {
        console.error('Payment Error:', message)
      },
      onClose: () => {
        console.log('Payment modal closed')
      }
    })
  }

  return (
    <div>
      <h1>Test Payment Integration</h1>
      <button onClick={handlePaymentClick}>Pay Now</button>
    </div>
  )
}

export default App

License

MIT © codemobii

Readme

Keywords

none

Package Sidebar

Install

npm i me-paas-sdk-react

Weekly Downloads

26

Version

1.0.7

License

MIT

Unpacked Size

22.6 kB

Total Files

12

Last publish

Collaborators

  • codemobii