React Payeezy Component
Payeezy original API is very thorough and this makes it more react. The component is based on a implimentation for Stripe form Adam Zmenak at https://github.com/azmenak/react-stripe-checkout .
Installation
Get started by installing with npm
npm install react-payeezy
Requires babel for compiling. If anyone is having issues with that, open an issue and I'll do my best to better document the build process.
Requirements
token
and PayeezyApiKey
are the only required props,
everything else is optional as per the Payeezy docs. See
Docs. All props
go through simple validation and are passed to Payeezy , they're
also documented in payeezy_us_v5.1.js
.
import React from 'react'import Payeezy from 'react-payeezy'; Component { ; } // ... { return // ... <Payeezy = ="my_PUBLISHABLE_PayeezyApiKey" /> }
This will give you a default Payeezy-style button which looks like this:
Send all the props!
<Payeezy ="Three Comma Co." ="Big Data Stuff" ="https://www.vidhub.co/assets/logos/vidhub-icon-2e5c629f64ced5598a56387d4e3d0c7c.png" ="div" ="Give Money" = ="USD" ="..." ="zh" ="info@vidhub.co" // // . . = // // ( ). = = // `` , // = // ``, ``, `` // 're using React-Tap-Event-Plugin triggerEvent="onTouchTap" > <button className="btn btn-primary"> Use your own child component, which gets wrapped in whatever component you pass into as "ComponentClass" (defaults to span) </button></Payeezy>
Other info
Pull requests welcome