Git Product home page Git Product logo

bambora-material-ui's Introduction

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>
);

bambora-material-ui's People

Contributors

mikeibberson avatar

Watchers

 avatar  avatar

Forkers

jayseo5953

bambora-material-ui's Issues

Inputs not focusable / height: 0

Hi there,

I am interested in using this library to add Bambora custom checkout to a React app I am working on, which uses Material-UI.

I managed to add the fields easily enough, however when they are displayed, only one of the 3 fields is ever focusable. It's usually the expiry field but sometimes it's one of the others. I noticed that the iframe height is 0 when this happens, and if I tweak this in the dev tools then I am able to focus the keyboard on the input again, but the wrapper doesn't seem to be aware that this is happening, causing the input helper to overlap the inputted text.

Have you see this before, and do you know if there's anything I can try to do to resolve this?

Submit form externally

Is there an easy way to tokenization externally, so that I don't need to use a Submit button in my form? I am working on a payment screen with its own 'Submit order' button on it, and I need to try and tokenize the card when that is clicked, instead of using a button within the Bambora form.

Form doesn't work without Name field

Hi again - sorry to be a pain in your side.

I noticed that the form doesn't work without a <Name /> due to the use of cardholder: nameInput.value in remoteForm.current.createToken.

Also when there is a <Name /> I see console errors about strings being passed instead of booleans for the error property.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.