FORM BUILDER ELEMENTS
TABLE OF CONTENTS
- What is a Magstripe element?
- How do I add a Magstripe element to my form?
- How do I parse Credit Card Information?
What is a Magstripe element?
The Magstripe Element can be used with hardware integrated with iForm such as the LineaPro and MagTek - iDynamo to capture information from the scan of a card such as a Drivers License, Credit Card, and More.
How do I add a Magstripe element to my form?
To add a Magstripe element to your form, please follow the instructions below.
STEP 1. Create a new form in Form Builder. We named our form Magstripe Scan Credit Card (Data Column Name: magstripe_scan_credit_card). Then click the Magstripe icon from the left-hand menu.
STEP 2. On the right-hand side, you'll see the element properties. Enter the name of your element. In this example, we used the label name Magstripe Element with a Data Column Name of magstripe_element
PLEASE NOTE: If you check the Based on Label option, it will create a data column based on the Label on the element.
STEP 3. In the Dynamic Value of the Magstripe Element, add in the following: magstripe_element=""
STEP 4. Add a Text Element (Read-Only or Text Area Element works too) to the form with Data Column Name scanned_magstripe. This field will populate the scanned value.
STEP 5. In the Dynamic Value of the Text element scanned_magstripe, add the following: magstripe_scan_credit_card.magstripe_element
The dynamic value format is parent_form.magstripe_element_name. Make sure to use your actual Form Name and Magstripe Element Name. This will populate the scanned data. The Parent Form Name is added to help with caching previously recorded data.
How do I parse Credit Card information?
The raw credit card swipe comes in as the following string: NAME--XXXXXXXXXXXXXXX--MMYY
STEP 1. With your form loaded in the Form Builder, click the Magstripe icon from the left-hand menu.
STEP 2. On the right-hand side, you'll see the element properties. Enter the name of your element. In this example, we used the label name Magstripe Element with a Data Column Name of magstripe_element
PLEASE NOTE: If you check the Based on Label option, it will create a data column based on the Label on the element.
STEP 3. In the Dynamic Value of the Magstripe Element, add in the following: magstripe_element=""
STEP 4. Add a Text Element to the form with Data Column Name credit_card_name. This will return the Name from the credit card scan.
STEP 5. In the Dynamic Value for the text element credit_card_name, add in the following: ((magstripe_element.split("--"))[0])
STEP 6. Add another Text Element with Data Column Name credit_card_number. This will return the credit card number from the scan.
STEP 7. In the Dynamic Value of the credit_card_number element, add in the following: ((magstripe_element.split("--"))[1])
STEP 8. Add one more Text Element with Data Column Name credit_card_expiration. This will return the credit card expiration date (MMYY)
STEP 9. In the Dynamic Value of the credit_card_expiration element, add in the following:
((magstripe_element.split("--"))[2])
Comments
0 comments
Please sign in to leave a comment.