Skip to content

jane/react-dwolla-iav

Repository files navigation

react-dwolla-iav

npm version CircleCI


Installation and Usage

npm i react-dwolla-iav

Dwolla doesn't provide a library for their Dwolla.js client-side scripts. This component wraps their script and provides a React component for embedding their IAV flow.

dwollaConfig docs

import * as React from 'react'
import Dwolla from 'react-dwolla-iav'

const onSuccess = (data) => { /* do stuff with data */ }
const onError = (err) => { /* handle err */ }

const dwollaConfig = {
  backButton: false,
  customerToken: 'asdf',
  environment: 'sandbox',
  fallbackToMicroDeposits: false,
  microDeposits: false,
  stylesheets: [],
  subscriber: () => {},
}

export default () => (
  <div>
    <Dwolla
      onSuccess={onSuccess}
      onError={onError}
      dwollaConfig={dwollaConfig}
    />
  </div>
)

This library assumes your environment has Promises, so you might need a polyfill for old browers.

License

MIT