by Matt Petrowsky, <iso@iso-ezine.com>

Life blood; taking charge of it
Using FileMaker Pro for processing credit cards
BONUS: Authorize.FP3
PLATFORM: Mac/Windows

Many businesses just don't exist without credit cards. Our business happens to be one of those. As common knowledge in business, credit card sales most often represent more than 90% of a company's sales transactions. Credit cards have become ingrained into our cultures and the way we think about purchasing. Who would have thought that a couple of cents worth of plastic could represent so much?

If you have longed for the day when you could process credit cards from within FileMaker then you need wait no longer - if you are using the Macintosh OS that is. Of course, there may be solutions out there that support DDE, and if you're a Windows user who knows of one give us a shout.

The de facto standard

About the only solution that ever popped into mind for credit card authorization with FileMaker on the Macintosh was MacAuthorize by Tellan (http://www.tellan.com/). They pretty much have a lock on the Mac market except for possibly some obscure code written for 4D or something done for some company in-house. The other side of MacAuthorize is PC Authorize.

On the Macintosh, MacAuthorize supports Apple Events which are used to convey the messages from a FileMaker database to the MacAuthorize software. Once you have set up a merchant account with a bank or merchant account provider you will authorize through one of the popular services. MacAuthorize supports all the major authorization services as well as other lesser known ones. Check out their web site for more information.

On the Windows side you have PCAuthorize which supports DDE(Dynamic Data Exchange). However PCAuthorize does not support the DDE Execute command that FileMaker supports. It uses the DDE Initiate to transfer the information into an authorization transaction. Because of this there needs to be an intermediary that will capture information from either the clipboard or pass information captured from a FileMaker generated DDE Execute to a DDE Initiate command. This would require some low level code development.

Behind the scenes: Macintosh

The support for Apple Events by MacAuthorize is pretty basic and the AppleScript dictionary has not been updated for quite some time. It would be nice to see some upgrades where the information in MacAuthorize could be directly reference with AppleEvents and AppleScript. For now, however, you are pretty much limited to sending information to MacAuthorize in one of two ways. You can store a credit card transaction or you can authorize it right on the spot. The advantage with immediate authorization is that you can capture the return events sent back from MacAuthorize. These events contain the information such as whether the credit card was approved or declined and what the transaction id was.

There are a couple of ways to implement support for processing via FileMaker as the front end. You can process credit cards one at a time, useful for point of sale or trade show environments, or you can simply load a batch of transactions and store them for later authorization. The later method is the one that we use since it is useful for mail order type situations. You can process a whole batch of credit card numbers at one time. What you can't get back is the individual results if you use MacAuthorize that way. By doing this automation with MacAuthorize is more limited.

Behind the scenes: Windows

On Windows the support for having FileMaker work with PCAuthorize is DDE (Dynamic Data Exchange) The suite of commands is much more robust that its Mac counterpart. Our assumption is that this is the case because of integration potential on the larger Windows market with programs such as Microsoft VisualBasic and Microsoft Access.

Setting up the file: Macintosh

The included BONUS file is already set up for simply storing the transactions into MacAuthorize. It is a basic template for processing credit cards and is ready to be modified. If you don't have a faint heart and want to dig into the technical aspects of the file then you are more than welcome. That is why the file is open. It was created for commercial use and is in a beta stage of development.

The basic approach is quite simplistic. Using AppleScript, MacAuthorize expects a certain command and this is stored in a field within a FileMaker database. There are actually two fields - one which serves as a template for the code required by AppleScript. The second field is a dynamically changing field that uses the Substitute function to replace vital information such as the credit card number, expiration, etc. to MacAuthorize.

The template was set up to provide batch processing services and will not be obvious on the outside. Looking into ScriptMaker will reveal a couple of looping scripts that will cycle through records.

The way that this file can be useful is by hooking it up to your own database files via relationships based on either both of the following fields or just one of them. These field are Customer Number and Invoice Number. MacAuthorize supports a number of fields that are useful for storing information that you may want to reference later. These are the two mentioned pieces of information.

Magnetic Stripe Readers & Receipt Printers

There are various companies out there that provide products that will work with FileMaker. To date we have tested one product from P.O.S. Direct (http://www.posdirect.com/). It is their Cipher 1023 model. When we tried it out hooking it up to either a PC or the Mac was quite easy. The PC of course required configuring the COM port and on the Mac it was a matter of plugging it into the ADB after having shut down. The other step required was setting various DIP switches on the bottom side of the unit. The rest was a matter of swiping cards.

The biggest fault we found with the particular reader we were sent was that it required that the person swiping the card absolutely had to be in the field that was to capture the data from the magnetic strip on the card. Also, to most users much of the data that is captured will mean little and can seem confusing. However, the data does get captured into the field. Basically mag strip readers relay information from the card as if it was typed on the keyboard. We are waiting to receive a unit that includes a reader with a decoder. This would allow both pre and postfix characters. So, for those of you who may not know what those allow you to do you could prefix a swipe with a command/control sequence. This means that when a card was swiped the input would start with a script that could be assigned to any of the numbers of 1 thru 9 since those are command keys that can be assigned to FileMaker scripts.

This means that all sorts of error checking and manipulation can be performed prior to actually capturing the data off of the swiped magnetic card.

P.O.S. Direct provides a strong set of both readers and receipt printers. In the coming months we will be providing more articles on what we find out about the products we are provided with by P.O.S. Direct. Being able to write your own point of purchase software that you can tailor to your business is *very* powerful!

Real Time Web Authorization.

It is possible to authorize real time transactions with MacAuthorize and WebStar on the Macintosh. On the Tellan web site you'll find a CGI script that will work with AppleScript to accomplish this. That means that if a FileMaker database is being used as part of a web site that processes orders it is possible to set up a site that will authorize within a few seconds and then provide the customer on the other side of the web browser with information regarding their transaction.

Because of recent news leaks from MacWeek regarding FileMaker Pro 4.0 you can expect that you can provide real time credit card authorization services directly from FileMaker. The means that you would be able to have your order database talk directly with MacAuthorize when getting an order from the web and then immediately tell the customer whether the transaction was approved or not.

Stay tuned to future articles as we integrate these features ourselves into our own system.

Conclusion

If you've ever had a need to authorize credit cards and wanted to do it with FileMaker Pro then there is no reason for you not to start right now. The process can be very simple and will reduce the time it takes to authorize transactions in any other way. Dealing with physical terminals is non existent and hassle-free.

Using a Magnetic reader at point of purchase locations will save you on percentage chargers and other headaches.

Use the database that accompanies this issue to break down what is needed to tailor these solutions to your needs.

## END ##