One of our client wanted us to build a solution for them to process credit cards from a FileMaker application with authorize.net and merchant account gateway.
All we wanted to do is to capture the Credit Card data and send it to the iPad filemaker app and then send it to the web-service of the payment gateway.
Filemaker API and Payment Gateway:
Initially we made the integration using a hosted Filemaker file and PHP server; the processing worked well.
Below are steps explaining the same,
The problem with the above procedure requires to host the file on the Filemaker server as we are making a db connection to get the payment gateway details, and hence we have to access the app on the iPad remotely.
This added some restriction to the mobility as we need to be within the LAN area or else we will be loosing connection with the server, hence the processing and updating of record will be affected, so we decided to make the app resident on the iPad itself.
Now we required a third party app to integrate with FilemakerGo application and as we are not able to install plugins for the Filemaker Go so we looked forward for third party apps supporting URL schemes.We found the "Credit Card Terminal" from innerfence serving the purpose.
Credit Card Terminal:
The above app is free on the App Store and also gives away a free Credit Card when we signup as a new merchant.
For this to work on the iPad we need to make use of URL Schemes
The URL protocol allows FileMaker Go to communicate with other iOS applications.
Learn more:
http://help.filemaker.com/app/answers/detail/a_id/7786/kw/fmp7script
URL Scheme used (Its URL Encoded):
Th above URL takes us to the CC Terminal application on the Ipad and then will ask us to swipe in the credit card details, after processing the card it will send us back to the FM Go file called "POS.fmp12” and will start executing the script called "CallBackScript".
We can pass as much info from FM Go to CC terminal as we want by setting the other query string parameters in the base URL, I have just passed the amount and email in the above example.
The other parameters that we can pass on the URL is here on this page
https://github.com/innerfence/ChargeDemo
The "returnURL" is responsible for the call of “CallBackScript” script in the “POS.fmp12” file. The results of the charge will be returned via this return URL by including additional query string parameters which gets automatically declared. We can set those variables into our fields directly.
$ifcc_responseType - approved, cancelled, declined, or error
$ifcc_transactionId - transaction id (e.g. 100001)
$ifcc_amount - amount charged (e.g. 10.99)
$ifcc_currency - currency of amount (e.g. USD)
$ifcc_taxAmount - tax portion from amount (e.g. 0.93)
$ifcc_taxRate - tax rate applied to original amount (e.g. 8.5)
$ifcc_tipAmount - tip portion from amount (e.g. 1.50)
$ifcc_redactedCardNumber - redacted card number (e.g. XXXXXXXXXXXX1111)
$ifcc_cardType - card type: Visa, MasterCard, Amex, Discover, Maestro, Solo, or Unknown
The above app charges some monthly amount and Interchange fees.
Other better pricing offers are also available for high volume purchase for the Credit Card Terminal.
Learn more:
http://www.innerfence.com/apps/credit-card-terminal
http://www.innerfence.com/apps/credit-card-terminal/developer-api
https://github.com/innerfence/ChargeDemo
Addition of a monthly fee and per-charge transaction fee cuts further into profit, so we looked forward for an app that will help us read the magnetic stripe from the Credit Card and process the Credit card using payment gateway API through web viewer.
CCQ-FM:
Now we need to get rid of the intervention of the filemaker server, so no Filemaker API is used, we planned to give away the details needed for processing on the URL itself in some encrypted format from the web viewer after getting the request the API will decrypt then will parse and process the card and will send the response back to the requested client on the URL itself.
On the Filemaker Go we will be executing a timer script to check for the response available or not using the GetLayoutObject("webviewer", "source") for a preset time.
When the response is available it parses the data and updates different fields for to log the transaction results on the filemakerGo application and shows the user about the payment processing details.
The first character in the request must be a ‘?’.
We have to add the string containing our protocol for return data. CardSwipe® will append the data from the mag stripe to the end of our request. We have to replace any spaces with %20.
Using the FMP7Script ( and FMP for FileMaker Go 12 ) protocols
CardSwipe® will return the swipe data at the end of our url string.
For a local database named Invoice.fp7 (.fp7 is optional) and a script named Process Scan our call would look like this:
For FileMaker Go 12 our call would look like this:
CardSwipe® will return the mag stripe data as a script parameter.
We can add parameters and variables
For FileMaker Go 12:
This will create a variable $CCData that will contain the mag stripe data.
The tilde ~ character prior to the database name indicates that it is a local database if the database is hosted then the IP address should be sent instead of the tilde.
Additional instructions for FileMaker available at: http://www.ccq-fm.com/fmgo_development.pdf
You can download the integration guide at http://www.ccq-fm.com/CardSwipeIntegrationGuide.pdf
Please refer to the applications documentation for further information.
The CCQ-FM can itself be used without any other API to process credit cards and it has also got PA-DSS Certified Credit Card Processing for Filemaker Systems and the Web.
CardSwipe:
Any of the above methods could be used as the situation demands. You can decide which of the above methods fits your necessity well. There are other Ipad/Iphone apps too that can be used to process credit cards from FilemakerGo app, we need to check for
the support of URLScheme for that app to communicate with the Filemaker app.
Surya Kanta Mekap
Software Developer, Mindfire Solutions, India
http://www.mindfiresolutions.com
Skype: mfsi_suryam
1 Comment
Recommended Comments