1.0.3 • Published 5 years ago

react-nab-velocity-checkout v1.0.3

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

Welcome!

This is a react component that acts as a wrapper for the Nab Velocity Hosted Payment Form.

There is no need to add script tags in your index.html.

Props:

NameTypeRequiredDescription
onProcessPaymentfunctionYESPayment success callback
componentstring / Component(function)NOButton component that triggers the form (default <button>)
amountnumberYESTransaction ammount of money
textstring / elementNOButton text
terminalProfileIdstringYESYour Nab Velocity's POS system id
invoiceNumstringNOInner POS System invoice number
descriptionstringNOPayment descriptor
emailstringNOCustomer email
billingNamestringNOCustomer name
billingAddressstringNOCustomer address
billingCitystringNOCustomer city
billingStatestringNOCustomer state (abbreviation)
billingPostalCodestringNOCustomer postal code

Example:

import React, { Component } from "react";
import NabVelocity from "react-nab-velocity-checkout";
import Button from "./Button";

class App extends Component {
  render() {
    return (
      <div>
        <NabVelocity   
          component={Button}       
          amount={12}
          terminalProfileId="234"
          invoiceNum='320329304'
          description="Awesome product"
          email="johndoe@mail.com"
          billingName="John Doe"
          billingAddress="742 Evergreen Terrace"
          billingCity="Miami"
          billingState="FL" //Abbreviation is important!
          text="Pay Your Awesome Product"
          billingPostalCode="12345"
        />
      </div>
    );
  }
}

export default App;