Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
react-datatrans-light-box
Advanced tools
Datatrans light box mode component for React. Render this component anywhere in your DOM tree in order to show the Datatrans payment page in fullscreen mode.
React is defined as a peer dependency and expected to be made available by your project. Other than that this component is completely dependency-free.
npm i react-datatrans-light-box --save
or
yarn add react-datatrans-light-box --save
import React, {PropTypes, Component} from 'react'
import Lightbox from 'react-datatrans-lightbox'
export default class App extends Component {
constructor(props) {
super(props)
this.state = { showsLightBox: false }
this.start = this.start.bind(this)
}
start() {
this.setState({showsLightBox: true})
}
render() {
return <div>
<div> Your React App </div>
<button onClick={this.start}> start lightbox </button>
{this.state.showsLightBox && <LightBox
merchantId='1100004624'
refno='1100004624'
amount='1000'
currency='CHF'
sign='xxx'
/>}
</div>
}
}
Name | Type | Description |
---|---|---|
merchantId | String | Merchant identifier provided to you by Datatrans. |
refno | String | Any value by which you would like to reference the payment. |
amount | String | The amount in cents you would like to charge your customer. |
currency | String | The type of currency that will be used for the payment. |
sign | String | Transaction security parameter. Find it in Datatrans' Webadmin Tool. |
Name | Type | Description |
---|---|---|
production | Boolean | Indicates whether requests hit Datatrans' production or development environment. Defaults to false. |
onOpen | Function | Called when payment page has opened. |
onCancel | Function | Called when user cancels payment. |
onLoad | Function | Called when payment page is loaded. |
onError | Function | Called when there was an error. |
and many more... | Refer to this PDF to get the full list of supported parameters. |
FAQs
Datatrans Lightbox component for React apps
The npm package react-datatrans-light-box receives a total of 1,976 weekly downloads. As such, react-datatrans-light-box popularity was classified as popular.
We found that react-datatrans-light-box demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.