Note: Authorize.net test accounts will not work, you must have a full account. Once you have an account, obtain a transaction key in the Account/Security Settings/Transaction Key area on the account.authorize.net website.
CCSetGateway("Authorize.net") // for Authorize.net accounts (the default)
CCSetGateway("PayPal") // for Payflow Pro accounts
Once your merchant account is set up correctly, running charges can be done in one quick step. Here is an example of its usage:
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; cardNumber; expDate )The above method will process a payment transaction for a card, and return the gateway transactionID for the transaction, or the word "
ERROR
",
if the transaction fails for some reason. For additional information about the failure, call CCLastError
.
It is important that you store this resulting transactionID, you may need it to VOID the transaction later.
The minimum amount of information needed to process a transaction is:
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; cardNumber; expDate; "chargeDescription=" & description; "cardType=" & cardType; "verificationCode=" & securityCode )Here is a list of the most common valid additional parameters:
USD
, for example)CCVoidPayment
and CCRefund
functions:Before attempting to perform a card-present transaction, make sure your gateway merchant account is configured for processing card-present transactions. Before performing a card-present transaction using the CCProcessPayment function, you must first call the CCSetGateway function, passing in the optional parameter "cardPresent=true". If the CCSetGateway function returns a 1, then you can perform a card-present transaction using the syntax below.
Authorize.net
A card-present transaction should pass in Track 1 or Track 2 data using the additional parameters track1 and track2.
Track 1 and Track 2 are parts of the raw string generated when a credit card is passed through a magnetic stripe card
reader. See http://www.exeba.com/comm40/creditcardformat.htm
for a description of the Track 1 and Track 2 data formats.
Note: You do not have to pass in a card number and or an expiration date when performing a card-present
transaction; the Authorize.Net gateway will read this information directly from the track data. Make sure you pass in
empty quotes ("") for those parameters.
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; ""; ""; "track1=B4111111111111111^CardUser/John^111110100000019301000000877000000" )Payflow Pro
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; ""; //notice the empty string in place of the cardNumber ""; //notice the empty string in place of the expirationDate "track2=;4912000033330026=15121011000012345678?" )
To void a transaction, you need the transactionID which was returned by the CCProcessPayment function. Pass this (along with other payment info) to the CCVoidPayment function. See the function documentation for an example of voiding a previous transaction.
To credit a transaction, you need the transactionID which was returned by the CCProcessPayment function. Pass this (along with other payment info) to the CCRefund function. This is similar to the void process, but accepts a dollar amount.
CCRefund( settings::merchantAccount ; settings::transactionKey ; // your transaction key or password "1321353789" ; // the transactionID being credited "1234" ; // the last four digits of the credit card number 0.02 ; // the amount of the refund "expirationDate=" & Date(12, 1, 2010) ; // credit card expiration date "firstName=John" ; // card holder first name "lastName=Doe" ; // card holder last name )
When something unexpected happens, a plugin function returns a result of "ERROR"
. This makes it easy to check for errors.
If a plugin function returns "ERROR", call the CCLastError
function to get a detailed description of what went wrong.
Here is an example of basic error reporting:
Set Variable [ $result = MyPluginFunction("x" ; "y" ; "z") ] If [ $result = "ERROR" ] Show Custom Dialog [ "An error occurred: " & CCLastError ] End If
Since the string "ERROR"
evaluates to false when evaluated by FileMaker, and most plugin functions return a 1
when successful, you can chain multiple dependent plugin operations together using the "and"
operator.
However, in this case the result will be a 1
or a 0
, not "ERROR"
. For example:
// chain multiple calls together
// if any of the functions fail, the calculation will
// short-circuit with a result of false
,
// and none of the subsequent function calls will be evaluated.
Set Variable [ $success =
FirstPluginFunction("x") and
SecondPluginFunction("y") and
ThirdPluginFunction("z")
]
If [not $success]
Show Custom Dialog [ "An error occurred: " & CCLastError ]
End If
Note: the above only works for plugin functions which return 1
on success! Check the documentation for each function used in this manner.
If a plugin is not installed correctly, calls to a plugin function will return "?". As part of your startup script, you should check for this occurrence and display a warning accordingly that the plugin needs to be installed. Note: when treated as a boolean true/false value, FileMaker will treat ?
as true
.
FileMaker version 7 or higher.
Java Virtual Machine (JVM) version 1.5 or later. If you are running a JVM earlier than 1.5, you should upgrade.
Download a JVM from http://www.java.com/en/download/. If you are not sure what
version of Java you have installed, you can do java -version
on the command line in Windows or OS X.
Windows, or Mac OS X version 10.4 or higher.
Note to intel Mac users: running this plugin under Rosetta is not supported. Upgrade to FileMaker 8.5 to run our plugin in native Intel mode.
Drag the plugin from the MAC or WIN folder into your FileMaker extensions, and restart FileMaker.
This will also enable the plugin for use with Instant Web Publishing from the FileMaker Pro client software.
If the plugin does not load correctly, double-check that you meet the system requirements.
You do not need to do this step unless you plan on using the plugin with Instant Web Publishing or Custom Web Publishing with FileMaker Server Advanced. You will need an Enterprise License to use this feature.
For installing into the Web Publishing Engine with FileMaker Server or FileMaker Server Advanced, drag the plugin from the MAC or WIN folder
into the FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins
folder. If there is no Plugins
folder inside the wpc
folder, then create it manually.
Restart FileMaker Web Publishing, and now the plugins should be ready to go.
Note that due to a bug which we and other plugin vendors have reported to FileMaker, web plugins do not work in FileMaker Web Publishing Engine 8.0v4 on Mac OS X. You will need to use a later version, like 9, or an earlier version, like 8.0v3. The Windows FileMaker Server 8.0v4 does not have this bug, and will work correctly.
The easiest way to test whether the plugin is working is to have a calculation which calls the version function of the plugin, and display that on an IWP layout. If it shows "?", then the plugin is not working. If it shows a number, then the plugin has been installed successfully.
You do not need to do this step unless you plan on using the plugin with scheduled script triggering, a new feature in FileMaker Server 9. You will need an Enterprise License to use this feature.
/Library/FileMaker Server/Database Server/Extensions
folder.
On Windows, this is at C:\Program Files\FileMaker\FileMaker Server\Database Server\Extensions
.Configuration -> Database Server->Server Plug-ins
and check the box that says 'Enable FileMaker Server to use plug-ins', and then check the 'enabled' box for this plugin.
Click the 'save' button and wait a few seconds to make sure that the 'enabled' check box stays checked. If it does not, then there was an error loading the plugin and you should contact us for help troubleshooting.
You should now be able to write schedules that trigger scripts which use the plugin.360Works has created an AutoUpdate helper database which makes setting up Auto Update much easier. This file includes pre-configured plugin files which you can place on your server, and an auto-update script for each of our plugins which you can paste into your own solution.
You can get the AutoUpdate360Works file at fmp7://autoupdate.360works.com/AutoUpdate360Works. Follow the instructions included in the file to either host your own Auto Update server or pull the files from ours.
Plugins will run in demo mode until they are registered. While running in Demo mode, the product will run for 2 hours every time you launch FileMaker / FileMaker Server / FileMaker Web Publishing Engine. The 2 hour time limit will reset every time you relaunch FileMaker. There is no expiration date when Demo mode stops working. There are no feature differences between the Demo version and the licensed version.
Once you have purchased the plugin, you can register it with the license key. Once a valid license key is entered, the product will run for as long as FileMaker is running. After FileMaker starts up with the plugin installed, open FileMaker preferences, click on the Plug-ins tab, select the plugin from the list, and click the Configure button. Enter your license key and company name in this dialog. You will only need to do this once on a given machine. Alternately, you can use the registration function to register the plugin during a startup script.
Note that if you are running the plugin with FileMaker Server / FileMaker Web Publishing Engine, you must use the registration function to register the plugin, since there is no preferences dialog on FileMaker Server to enter the license key and company name.
We love to hear your suggestions for improving our products! If you are experiencing problems with this plugin, or have a feature request, or are happy with it, we'd appreciate hearing about it. Send us a message on our website, or email us!
You must process a payment with the CCProcessPayment function before calling this function
The code will be one of the following:
A = Address (Street) matches, ZIP does not
B = Address information not provided for AVS check
E =
AVS error
G = Non-U.S. Card Issuing Bank
N = No Match on Address (Street) or ZIP
P = AVS
not applicable for this transaction
R = Retry – System unavailable or timed out
S = Service not
supported by issuer
U = Address information is unavailable
W = 9 digit ZIP matches, Address
(Street) does not
X = Address (Street) and 9 digit ZIP match
Y = Address (Street) and 5 digit ZIP
match
Z = 5 digit ZIP matches, Address (Street) does not
Note: This feature is currently only implemented for the Authorize.net gateway.
""
if there was no error.
Generally, the CCProcessPayment function returns this value as well. This function is here as a convenience if you're not able to retrieve that value due to chaining multiple functions together.
You must process a payment before calling this function.
The second parameter (txKey
) should be your 16-digit Authorize.net transaction key.
You can obtain an Authorize.net transactionKey by logging into https://account.authorize.net/ and going
to the Account / Settings / Transaction key section.
Payflow Pro only supports passwords, not transaction keys. If you have a Payflow Pro merchant account, simply use your Payflow Pro account password for the second parameter to this function.
In most cases, the fourth parameter (dollarAmount
) may be any amount less than or equal to the amount
of the transaction identified by the third parameter (previousTransactionID
).
To pass in additional parameters, see the documentation and examples at the top of this document.
If successful, this function returns the unique transactionID
for the payment (as assigned by the payment gateway).
If you wish to void the payment later with the CCVoidPayment function, you will need this number!
Note: if test mode is enabled, a successful Authorize.net transaction will return 123456789
.
detailed information about the nature of the error).
merchantAccountName
- your payment gateway merchant account nametxKey
- your payflow Pro merchant account password or Authorize.net transaction keypreviousTransactionID
- the id of the previously authorized transaction to be processeddollarAmount
- the amount of the transaction
The second parameter (txKey
) should be your 16-digit Authorize.net transaction key.
You can obtain an Authorize.net transactionKey by logging into https://account.authorize.net/ and going
to the Account / Settings / Transaction key section.
Payflow Pro only supports passwords, not transaction keys. If you have a Payflow Pro merchant account, simply use your Payflow Pro account password for the second parameter to this function.
To perform an authorize-only transaction without submitting it for settlement, you must pass in an additional parameter named authMode
.
and set its value to AUTH_ONLY
using the following format: 'authMode=AUTH_ONLY'.
To pass in additional parameters, see the documentation and examples at the top of this document.
If successful, this function returns the unique transactionID
for the transaction (as assigned by the payment gateway).
If you wish to void the transaction with the CCVoidPayment function or submit an authorize-only transaction for settlement with the
CCProcessAuthorizedPayment function, you will need this number!
Note: if test mode is enabled, a successful Authorize.net transaction will return 123456789
.
detailed information about the nature of the error).
merchantAccountName
- your payment gateway merchant account nametxKey
- your payflow Pro merchant account password or Authorize.net transaction keydollarAmount
- the amount of the transactioncardNumber
- the credit card account number to charge for the transactionexpirationDate
- the expiration date of the credit card being charged. Format the expiration date as MMYY or MM/YY or MM/DD/YYRefund transactions must reference a transaction ID, which identifies the transaction that serves as the source of the refund. Transactions must have been settled before they can be refunded; however, you may void unsettled transactions (see CCVoidPayment). The amount to be refunded must not exceed the total amount of the original transaction, less the total amount of any previous refunds to the same transaction.
To pass in additional parameters, see the documentation and examples at the top of this document.
merchantAccountName
- your payment gateway merchant account nametxKey
- your Payflow Pro merchant account password or Authorize.net transaction keypreviousTransactionID
- the transactionId of a previously processed transaction.cardNumber
- the credit card account number to credit for the transaction. For Authorize.net credits, you may either pass the entire card number, or just the last four digits. This value is not required by the Payflow Pro gateway, therefore you may pass an empty string ("").amountToCredit
- the amount to credit, as a positive number. Must be less than or equal to the original transaction amount. If a negative number is passed, the absolute value is used. If using the Payflow Pro gateway, you may enter an empty string ("") for this parameter if you wish to perform a full refund.licenseKey
- a valid license key stringregisteredTo
- the name for the license key usedThe following gateways are supported:
This plugin function takes additional arguments. Currently the only optional argument is whether submitted transactions are to be processed as SWIPE (card-present) transactions.
If you are using the plugin for card-present transactions, pass cardPresent=true
as an optional parameter.
For example:
CCSetGateway("Authorize.net" ; "cardPresent=true");If you do not specify a value the default is
false
(card-not-present mode).
gatewayName
- one of the supported gateway names.testModeSetting
- 1 or 0
Use the GetValue
function in FileMaker to get the following specific values:
Set Variable[$data = mytable::swipe] Set Variable[$accountNumber = getValue($data ; 1)] Set Variable[$cardHolderName = getValue($data ; 2)] Set Variable[$expirationYYMM = getValue($data ; 3)] Set Variable[$additionalData = getValue($data ; 4)]
This is primarily for use in card-present transactions. See http://www.exeba.com/comm40/creditcardformat.htm for a description of the track1 and track2 data formats.
trackData
- track1 or track2 data from card readerThis can be very handy for "validated by calculation" fields, to ensure that only valid credit cards are entered.
cardNumber
- credit card number, containing numbers and optional dashesdollarAmount
is replaced with the addition of the previousTransactionID
parameter. The
previousTransactionID should be the transactionID of the transaction you wish to void. This value is returned by the
CCProcessPayment
function. Alternately, you can use the CCLastPaymentTransactionID function
to get the transactionID of the last processed payment.
To pass in additional parameters, see the documentation and examples at the top of this document.
Here is an example of voiding a previous transaction whose transaction ID is 123:
CCVoidPayment ( Settings::merchantAccount ; Settings::transactionKey ; 123 ; // the previous transaction key "cardNumber=4444444444444441" ; "expirationDate=04/08" ; "firstName=Bob" ; "lastName=Smith" )information about the nature of the error).
merchantAccountName
- your payment gateway merchant account nametxKey
- your Payflow Pro merchant account password or Authorize.net transaction keypreviousTransactionID
- the transactionId of a previously processed transaction. Note that CVoidPayment will only work on orders that have not settled yet, which means that it will generally only work on payments made that same day. To void settled orders, use CCProcessPayment instead.