Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 816 Bytes

README.md

File metadata and controls

23 lines (20 loc) · 816 Bytes

Bambora Material UI

Inspired by the Custom Checkouts on Bambora's website, this implementation hooks into Material UI and takes care of validation and tokenization. You just need to worry about ordering the form fields and setting their labels and styles (i.e. input variant).

Please note that tests and examples are on the way.

import React from 'react';
import Bambora, {
  Submit,
  CreditCardField,
  CvvField,
  ExpiryField,
} from 'bambora-material-ui';

export default () => (
  <Bambora onTokenization={(e) => alert(e.token)}>
    <CreditCardField label="Credit card number" />
    <CvvField label="CVV" />
    <ExpiryField label="Expiry" />
    <Submit />
  </Bambora>
);