Creating a Donation Form with Beanstream’s Legato Library

API documentation can be very helpful but it’s always great to have a real World example you can show or offer to clients. Coming from freelance web development I know how important and time saving well written snippits can be that can be modified and rolled into various projects. That’s why I’m writing this two part tutorial creating a donation form with Beanstream’s Legato JavaScript Library. What you’ll need: A Test Account A Code Editor Some basic HTML knowledge About an Hour A Webhost with SSL

Building the Form

At the very basic level JavaScript requires you to capture 4 pieces of information to process the transaction:
  • Card Number
  • The Expiry Date including month and year – this will be two seperate fields
  • CVD number
We also will need an input for the donation amount. Additionally we probably want to capture some basic information so we can thank them, but these fields should be optional.
  • Name
  • Address
  • Phone Number
  • Email
Nicole Stright

Nicole Stright

Nicole is our coffee dependent content specialist. With a quick-witted way with words, she could make you enjoy reading an instruction manual. She was born American, raised Canadian and has lived briefly in Poland. A quintessential west coastian she can be found running the seawall, practicing savasana in yoga or enjoying an over-hopped I.P.A. Nicole is responsible for all of the bean puns as well as creating compelling copy driven by analytics that converts. She strives to simplify the complicated and wants readers to easily understand the often convoluted industry of payments.
Nicole Stright