Skip to content

irvinde/react-culqi

 
 

Repository files navigation

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

About

Culqi integration for React

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%