Skip to content

Me-Protocol/me-paas-sdk-react

Repository files navigation

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: '[email protected]',
      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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published