me-paas-sdk-react
v1.0.7
Published
Me Protocol as a Service SDK for React
Downloads
12
Readme
me-paas-sdk-react
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