1.0.1 • Published 3 years ago

react-bancard-checkout-js v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm version MIT License Test and publish

React Bancard Checkout

It's a react component that loads the Bancard secure payment iFrame based on the bancard-checkout-js 3.0.0 library.

Usage/Examples

import { BancardIframe } from "react-bancard-checkout"

function App() {
  return <BancardIframe 
    processType="Zimple"
    processId="1234"
    enviroment="Staging"
  />
}

Props

NameTypeRequiredDefaultDescription
processIdstringfalseundefinedProcess identifier to be used to invoke the iframe of occasional payment
aliasTokenstringfalseundefinedIt is obtained when retrieving the list of cards of a user
processTypeiFrameTypefalseCheckoutThe type of process to be carried out in this operation
enviromentProduction or StagingfalseStagingIn what environment is the application running
options.stylesiFrameStylesfalseundefinedStyles for the iframe. Only HEX, HSL and RGB formats are valid
options.handler(data: IData) => void;falseundefinedYou can pass a function to modify the default behavior of the component that would redirect to the return url

Running Tests

To run tests, run the following command

 npm run test

or

 yarn test