Running credit cards from FileMaker Go
This tutorial video describes how to run credit card transactions from FileMaker Go using the 360Works Plastic plugin. The transcript is attached below, and the video can be watched on YouTube at http://www.youtube.com/watch?v=qrOucBq6HHg.
Hi, I’m Sarah Mulligan from 360Works, and this video is going to demonstrate how to run credit cards from FileMaker Go. We’ll be using a combination of FileMaker Server, FileMaker Go, and a plugin called Plastic. Plastic is a 360Works product that allows users to run credit card transactions from FileMaker. You’ll need either the Enterprise or Portfolio License of Plastic, which allows for server side scripts. The demo version does work for this example; however, it will require a restart after 2 hours. You’ll also need an Authorize.net or PayPal merchant account for this to work.
To start, we’ll load the solution file on FileMaker Server. FMS will include all our scripts, including the payment script. FileMaker Server will also be loaded with the Plastic Plugin. We will then access this file from FileMaker Go, but all the scripts and plugins will be located on FMS. We’ll let the user enter payment information remotely, and then save that information to the database as a transaction. We’ll also attach another field called Statusand set it to PENDING. The server will run a script every minute to find all transactions marked with PENDING and then process the transaction from FileMaker Server. The FileMaker Go user could then refresh his interface to see the payment was successful, or be presented with a descriptive error.
Let’s take a close look at how this works in an example. We’ll be working with the solution file found with the Plastic demo download. You can find this file and a demo plugin free on our website, 360works.com/plastic. I’ve already loaded this file into FileMaker Server.
On this layout, we set a number of fields. In this example, first select the gateway. Currently we support Authorize.net and PayPal. We also enter our Merchant Account and Password. You may want to set these fields yourself in a different layout, and only expose the relevant fields to an end user. The end user will enter an amount, a card number, and an expiration date in the form MMYY. We also have a field called Status, which should default to “PENDING” with a new record. I’ve done this by auto entering “PENDING” in the options for the field Status. Make sure the fields are committed in FileMaker Go.
This should be all the information you collect from FileMaker Go.
From FileMaker Server, let’s open our solution and take a look at the server-side script that actually processes this payment.
It performs a find, looking for all status fields marked pending. It sets the processing gateway using the function CCSetGateway from the plugin Plastic.
From the found set, it performs a Set field step on those transaction IDs. It uses the function CCProcesssPayment from the Plastic plugin. Set the following:
CCProcessPayment(
Settings::merchantAccount ;
Settings::transactionKey ;
Simple example::Amount ;
Simple example::Card number ;
Simple example::Expiration date
)
Finally, we check if the CCProcessPayment returned an error, in which case we set the status to CCLastError. CCLastError will provide more information if the transaction was not successful. These errors would be descriptive and end-user friendly; for example: card declined, or loss of connection. If there were no errors, we set the Status field to SUCCESS.
This makes the script that the server will run. To set the script up on FileMaker Server, we’ll create a new schedule that runs that FileMaker scripts every minute. This one minute interval will reduce the time a client will have to wait.
Since this solution includes credit card information, FileMaker Server should use encryption when passing this information. To enable this, open FileMaker Server Admin Console, choose Database Server, click the security tab, and choose “Secure connections to Database Server.” Restart FMS to being using the encryption.
Taking a look at this altogether again, we use FileMaker Go to enter our payment information, we mark the status as PENDING, and the FileMaker Server runs a script that looks for those PENDING transactions and runs them using Plastic.
This concludes the tutorial on running credit card transactions using Plastic and FileMaker Go. If you have any questions, please feel free to email us at plugins@360works.com, ask a question on one of our forums, or visit us at 360works.com.