Skip to content

Files

Latest commit

b3300a3 · Jan 8, 2019

History

History
50 lines (38 loc) · 1.17 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.17 KB

react-culqi

A React library for integration with Culqi payments processor.

NPM registry Travis CI

Install

# Yarn
yarn add react-culqi

# NPM
npm install --save react-culqi

Usage

See an interactive example at:

Edit react-culqi

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>
  );
};

License

MIT © klujanrosas