Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto-executing a send after credit card swipe?

Featured Replies

I have two scripts, "Swipe" and "Process.

1.) Swipe - Simply navigates to a credit card swipe field. When the user swipes the card it parses the data into the appropriate fields.

2.) Process - Send the swiped data to the credit card company and returns the results.

I want to execute both tasks in one button click. I would like the script to prompt for user to scan card...and then automatically go to step two after they swipe it. It takes 3-5 seconds for the magnetic reader to send the data and another second to parse it but I would prefer to not force the user to scan the card within a certain number of seconds,

I am looking for a solution that does not require a plug-in.

Is this possible?

..It would be hard to accomplish. I've got no clue about this to be honest, but i'm guessing a good place to start would be with what the swiper sends the computer ... besides the code when a card is swiped.

I've done something like this with a card reader and/or barcode reader. The input device can be set to add a carriage return, which can be set to exit the field. This field exit can trigger an auto-enter calculation.

If you actually want a script to occur at that point without pressing a button or a key, you will need a plugin. But there are free ones like EventScript that will do the trick.

I set up something like this for checking out barcoded laptops to students with ID cards with magnetic strips. There are no buttons and only one field on the layout, just scan and swipe....

Hmmm, carriage return was interesting, that gets stored in the back of my mind in case i ever need something like that.

Here's an idea.. Try doing everything reed said. But, send two carriage returns not one. If the next thing in the tab order is a button to execute a script...

  • Author

The input device can be set to add a carriage return, which can be set to exit the field.

How do I tell FM8 to do this?

I defined the field to go to the next field upon a carriage return but this does not work.

I tried adding one, two, and three carriage returns to the mag reader swipe but it simply adds the carriage returns to the text string that is being dumped into the field.

Right Click your field, Choose Field Control --> Behaviour. Then select goto next object using return and enter keys.

~Genx

And why don't you want to use a plugin? - It would make your whole life a looottt easier... Unless it's web based. As reed mentioned there is a free plug-in called eventscript.

  • Author

Right Click your field, Choose Field Control --> Behaviour. Then select goto next object using return and enter keys.

~Genx

Sorry if I was not clear in my last post but what you are suggesting is exactly what I have done.

Regardless of how the field's behavior is set the mag reader just dumps the data into the targeted text field. The extra carriage returns that I have added to the magnetic swipe dump do not trigger it to exit the field.

Your sure you are sending the CRLF character?

  • Author

And why don't you want to use a plugin? - It would make your whole life a looottt easier... Unless it's web based. As reed mentioned there is a free plug-in called eventscript.

I am okay with using a plug-in to solve this and EventScript is what I am currently trying. The problem is that I can not trigger it because the card swipe dump won't automatically exit the field.

Can't you auto-enter a false value then simply trigger on change? That's an actual question for all i recommend using it i'm only just starting to use it myself now.

Anyway i'm not sure you're sending the correct character, it has to be CRLF (pilcrow) do a search on google for the char code.

  • Author

Your sure you are sending the CRLF character?

I am not sure what "CRLF" means but with the exception the actual credit card number this is exactly what is being dumped from the card reader:

CC_Swipe.gif

  • Author

Thanks Genx.

I reprogrammed the mag reader from scratch and added the CRLF character. It is now working.

Well there you go, Yay. Did you end up using the two carriage returns or just one and eventscript?

~Genx

  • Author

I am using one carriage return and EventScript.

I am reading through the EvenScript sample file right now...and trying to make sense of it.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.