A React library for integration with Culqi payments processor.
# Yarn
yarn add react-culqi
# NPM
npm install --save react-culqi
See an interactive example at:
import { CulqiProvider, Culqi } from 'react-culqi';
const App = () => {
return (
<CulqiProvider
publicKey="your-culqi-public-key-here"
onToken={token => {
/* handle a successful token */
}}
onError={error => {
/* handle an error during tokenization */
}}
>
<Culqi>
{({ openCulqi, setAmount, amount }) => {
return <button onClick={openCulqi}>Open Culqi</button>;
}}
</Culqi>
</CulqiProvider>
);
};
MIT © klujanrosas