360Works Plastic/Documentation
360Works Plastic User Guide
Plastic provides easy credit card processing capabilities for FileMaker Pro.Using the plugin
Consult the "Plastic Example.fp7" Filemaker file for examples of plugin usage.
Plastic enables FileMaker Pro to act as a payment portal, which sends and receives SSL-encrypted credit card transaction information to and from a payment gateway. The payment gateway ensures the transaction information passes securely from the customer to the gateway, from the gateway to the eventual payment processor and vice-versa. </p>
To use Plastic, you must have an active merchant account with a payment gateway provider. Plastic currently supports the following payment gateways: </p>
- <a href="http://www.authorize.net/solutions/merchantsolutions/">Authorize.Net</a>
- <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside">Payflow Pro</a>
- <a href="https://www3.moneris.com/connect/en/index.php">eSELECTplus</a>
- <a href="http://www.firstdata.com/product_solutions/ecommerce/global_gateway/index.htm">First Data</a>
- <a href="https://www.usaepay.com/">USA ePay</a>
- <a href="http://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside">PayPal Website Payments Pro*</a>
- - 360Works Plastic only supports refund transactions when using the Website Payments Pro gateway </p>
Selecting a gateway provider
Before you begin processing charges, you need to tell the plugin what type of gateway account you are using. This is done by calling CCSetGateway and passing in the name of your gateway.
CCSetGateway("Authorize.Net")
CCSetGateway("Payflow Pro")
CCSetGateway("eSELECTplus")
CCSetGateway("First Data")
CCSetGateway("USAePay")
CCSetGateway("PayPal WPP")
CCSetGateway("InternetSecure")
</p>
Authorize.Net is the default payment gateway, so you do not need to call CCSetGateway
if you are only
using this gateway. There is one exception, however. If your Authorize.Net merchant account is a card-present
account, then you must call CCSetGateway
using the following syntax:
CCSetGateway("Authorize.Net"; "cardPresent=true")
Processing Payments
Once you properly configure your merchant account, you can quickly and easily process payment transactions.
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; cardNumber; expDate )
</p>
The CCProcessPayment function will process a credit card payment transaction and return a transaction
id. This function returns a transaction id if the transaction is successful or the word ERROR
if the
transaction fails. For detailed information about the most recent transaction failure, call the
CCLastError
function before calling any other transaction-processing function. </p>
Note: It is important to store the resulting transaction id because you may need it later to void the transaction, issue a refund or capture a previously authorized transaction. </p>
Information required to process a credit-card payment transaction
- merchant account name (this might also be known as a store id)
- transaction key (this might also be known as a password or token)
- credit card number
- credit card expiration date
- dollar amount
<a name="optional"> You may submit optional parameters to most of Plastic's payment-transaction processing functions. These parameters will be submitted to the payment gateway along with the basic transaction information. Although they are not usually required to process an order, these parameters can be useful for tasks such as address verification or linking a transaction to a customer id or an invoice number. To supply additional parameters to a function call, add them to the end of the parameter list after the last required parameter, using a "key=value" syntax. </a> </p>
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; cardNumber; expDate; "chargeDescription=" & Payment::description; "cardType=MasterCard"; "verificationCode=" & $securityCode )
Here is a list of all valid additional parameters:
- firstName</dt>
- First (given) name of the credit card holder</dd>
- lastName</dt>
- Last (surname) of the credit card holder</dd>
- chargeDescription</dt>
- brief description of the charges</dd>
- verificationCode</dt>
- the numeric verification code on the credit card. This is also known as the Card Security Code (CSC), sometimes called Card Verification Value (CVV), Card Verification Value Code (CVVC), Card Verification Code (CVC), or Verification Code (V-Code or V Code) </dd>
- cardType</dt>
- the type of credit card being processed (visa, mastercard, etc)</dd>
- invoiceNumber</dt>
- an arbitrary invoice number for your records</dd>
- poNumber</dt>
- an arbitrary purchase order number for your records</dd>
- customerId</dt>
- an arbitrary customer id for your records</dd>
- orderId</dt>
- a unique id for a particular transaction (Required by Moneris)</dd>
- address</dt>
- the billing address street address</dd>
- unitNumber</dt>
- the billing unit/apt no.</dd>
- city</dt>
- the billing address city</dd>
- state</dt>
- the billing address state</dd>
- zip</dt>
- the billing address zip</dd>
- country</dt>
- the billing address country</dd>
- phone</dt>
- the cardholder's phone numer</dd>
- fax</dt>
- the cardholder's fax numer</dd>
- email</dt>
- the cardholder's email address</dd>
- companyName</dt>
- the billing company name</dd>
- shipFirstName</dt>
- the shipping recipient's first name</dd>
- shipLastName</dt>
- the shipping recipient's last name></dd>
- shipAddress</dt>
- the shipping street address</dd>
- shipCity</dt>
- the shipping address city</dd>
- shipState</dt>
- the shipping address state</dd>
- shipZip</dt>
- the shipping address zip</dd>
- shipCountry</dt>
- the shipping address country</dd>
- shipPhone</dt>
- the shipping recipient's phone numer</dd>
- shipFax</dt>
- the shipping recipient's fax number</dd>
- shipCompanyName</dt>
- the shipping recipient's company name</dd>
- email</dt>
- the cardholder's email address</dd>
- currency</dt>
- currency of the transaction amount
(
USD
, for example)</dd> - track1</dt>
- track1 data from a card reader<a href="#track">*</a>.</dd>
- track2</dt>
- track2 data from a card reader<a href="#track">*</a>.</dd>
- authCode</dt>
- the authorization code returned by a call to CCLastPaymentAuthCode when using the Payments Gateway gateway.</dd>
- profileDescription</dt>
- A description of a customer profile created using the Authorize.Net Customer Information Manager (CIM) system. This optional parameter should only be used when calling CCProfileCreateCustomer or CCProfileUpdateCustomer.</dd>
PayPal Payflow Pro specific parameters: The following parameters are specific to the Payflow Pro gateway.
- user</dt>
- if you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions</dd>
- partner</dt>
- The ID provided to you by the authorized PayPal Reseller who registered you for the Payflow Pro service. If you purchased your account directly from PayPal, use PayPal.</dd>
Moneris eSELECTplus parameters: The following parameters are specific to the Moneris eSELECTplus gateway.
Please note that orderId is required to successfully execute any payment-processing function using the eSELECTplus gateway.
- orderId</dt>
- A user-defined order identification number required by all of the payment-processing functions (CCProcessPayment, CCProcessPaymentACH, CCCreateSubscription, CCCancelSubscription, CCVoidPayment, CCProcessAuthorizedPayment, CCRefund) when accessing the eSELECTplus gateway.</dd>
- province</dt>
- The billing province</dd>
- shipProvince</dt>
- The shipping province</dd>
First Data parameters: The following additional parameters are required to execute CCProcessPaymentACH using the First Data Global Gateway.
- bankState</dt>
- The state where the customer's bank is located. Use 2-letter state code for U.S. states. For international addresses, you can use this field for the province or territory, as applicable.</dd>
- driversLicenseNumber</dt>
- The customer's driver's license number</dd>
- driversLicenseState</dt>
- The state that issued the customer's driver's license</dd>
USA ePay parameters: The following additional parameters are required to execute CCProcessPaymentACH using the USA ePay gateway.
- driversLicenseNumber</dt>
- The customer's driver's license number</dd>
- driversLicenseState</dt>
- The state that issued the customer's driver's license</dd>
- ssn</dt>
- The customer's social security number</dd>
Void/Refund Parameters: These parameters are only used in the CCVoidPayment
and
CCRefund
functions:
- cardNumber</dt>
- The credit card number being voided (this is
optional for CCVoidPayment)</dd>
- expirationDate</dt>
- The expiration date of the credit card number being voided, in MM/YY format (this is optional)</dd>
Magnetic swipe parameters (track1 and track2)
Certain types of merchant accounts (usuallyreferred to as card-present accounts) require credit-card payment transaction requests to include the data contained in the magnetic stripe on the back of the credit card. This information is read as a string consisting of two delimited tracks: Track 1 and Track 2. Keep in mind that some card readers return the raw data, while others parse the raw data as a convenience. A raw data swipe will look something like this: </p>
%B1234123412341234^LAST/FIRST M^1112101000000000011100111000000?;1234123412341234=11121010000000000111?
</p>
Track 1 is delimited by a percent symbol and a question mark, so in the previous example Track 1 would be: </p>
%B1234123412341234^LAST/FIRST M^1112101000000000011100111000000?
</p>
Track 2 is delimited by a semicolon and question mark, so in the previous example Track 2 would be: </p>
;1234123412341234=11121010000000000111?
</p>
Note: As a convenience, the Plastic function CCTrackData will parse either Track 1 or Track 2 data as a return-separated string. </p>
Card-present transactions
Before attempting to perform a card-present transaction, makesure 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.</p> 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
<a href="http://www.exeba.com/comm40/creditcardformat.htm">http://www.exeba.com/comm40/creditcardformat.htm</a> 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. </p>
CCProcessPayment( merchantAccount; transactionKey; chargeAmount; ""; ""; "track1=B4111111111111111^CardUser/John^111110100000019301000000877000000" )
Payflow Pro
A card-present transaction using Payflow Pro should also pass in Track 1 or Track 2 data
using additional parameters. However, you must pass in empty strings for the card number and expiration date. </p>
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?" )
Voiding previous transactions
To void a transaction, you need the transaction ID returned byCCProcessPayment
. Pass this (along with other payment info) to the CCVoidPayment function. See
the function documentation for an example of voiding a previous transaction.
Crediting / Refunding previous transactions
To credit a transaction, you need the transaction ID returnedby CCProcessPayment
. Pass this (along with other payment info) to the CCRefund function. This
is similar to the void process, except it accepts a dollar amount and the credit card number (or the last four digits
of the credit card number) used to process the original transaction.
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 2.99 ; // the amount of the refund "expirationDate=" & Date(12, 1, 2010) ; // optional credit card expiration date "firstName=John" ; // optional card holder first name "lastName=Doe" ; // optional card holder last name )
PayPal Website Payments Pro refunds
To credit a PayPal Website Payments Pro trnasaction, you need atransaction ID returned from a PayPal transaction. Pass this and other info to the CCRefund function.
CCRefund{ settings::merchantAccount ; //API Signature settings::transactionKey ; //API Password "1321353789" ; // the transactionID being credited "" ; // credit card number does not apply here, so pass in an empty placeholder string "" ; // for full refunds, pass in an empty placeholder string; enter an amount for partial refunds "user=myUserName" ; // API Username; this is required for PayPal WPP refund transactions }
</p>
360Works Plugin Setup Guides
See Plugins_101 for Error reporting, installation, registration, and more.
Function Summary
- CCCreateSubscription ( merchantAccountName; txKey; dollarAmount; cardNumber; expirationDate; subscriptionNameOrId; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) —
- CCCreateSubscriptionACH ( merchantAccountName; txKey; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) —
- CCGetCardIssuer ( cardNumber ) — Returns the card issuer for a given card number.
- CCGetLast ( name ) — This function returns a value from the most recent transaction response that corresponds to the
name
parameter.
- CCLastAmountApproved —
- CCLastAmountRequested —
- CCLastAVS — Returns the gateway's Address Verification System Response for the last payment which was processed with {@link
#CCProcessPayment}.
- CCLastCCV —
- CCLastChargeResult — Returns the gateway's result code for the last operation.
- CCLastError — Returns the text of the last error triggered by a plugin function.
- CCLastPaymentAuthCode — Returns the gateway's approval code for the last payment which was processed with {@link #CCProcessPayment}.
- CCLastPaymentTransactionID — Returns the gateway's transaction ID for the last payment which was processed with {@link #CCProcessPayment}.
- CCLastRawResponse — This function returns the gateway's raw text response for the most recent transaction.
- CCLastRemainingBalance —
- CCLastSplitTenderId —
- CCLastSubscriptionID —
- CCLicenseInfo — Returns information about the license used.
- CCModifySubscription ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; cardNumber; expirationDate; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) —
- CCModifySubscriptionACH ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) —
- CCParam ( key ; value ) —
- CCPartialGetRemainingBalance — This function returns the remaining balance for a partial authorization.
- CCPartialGetRequestedAmount — This function returns the original amount requested for a partial authorization.
- CCProcessAuthorizedPayment ( merchantAccountName ; txKey ; previousTransactionID{; dollarAmount ; key1=value1; key2=value2; ...} ) — Processes an authorize-only transaction.
- CCProcessPayment ( merchantAccountName ; txKey ; dollarAmount ; cardNumber ; expirationDate {; key1=value1; key2=value2; ...} ) — Processes credit-card payments.
- CCProcessPaymentACH ( merchantAccountName ; txKey ; dollarAmount ; accountNumber ; routingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; checkNumber {; key1=value1; key2=value2; ...} ) — Processes an Automated Clearing House (ACH) or eCheck payment.
- CCProfileCreateCustomer ( merchantAccountName; txKey; customerId {; key1=value1; key2=value2; ...} ) — This function is used to create a customer profile using Authorize.
- CCProfileCreatePayment ( merchantAccountName; txKey; customerProfileId; cardNumber; expirationDate {; key1=value1; key2=value2; ...} ) — This function is used to create a payment profile associated with a customer profile created
using Authorize.
- CCProfileCreatePaymentACH ( merchantAccountName; txKey; customerProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} ) —
- CCProfileCreateShipping ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} ) — This function is used to create a shipping profile associated with a customer profile.
- CCProfileGetCustomer ( merchantAccountName; txKey; customerProfileId ) — This function is used to retrieve an existing customer profile.
- CCProfileGetPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId ) — This function is used to retrieve an existing payment profile.
- CCProfileGetShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId ) — This function is used to retrieve an existing shipping profile.
- CCProfileLastCustomerProfileID —
- CCProfileLastPaymentProfileID —
- CCProfileProcessAuthorizedPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; previousTransactionId; dollarAmount {; key1=value1; key2=value2; ...} ) — This function is used to process a previously authorized payment using a customer profile.
- CCProfileProcessPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; dollarAmount {; key1=value1; key2=value2; ...} ) — This function is used to process a credit-card payment using a customer profile created using {@link
#CCProfileCreateCustomer}.
- CCProfileRefund ( merchantAccountName; txKey; customerProfileId; paymentProfileId; previousTransactionId; amountToCredit, accountNumber {; key1=value1; key2=value2; ...} ) — This function is used to issue a refund for a previously processed payment transaction that has been settled.
- CCProfileVoidPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; previousTransactionId {; key1=value1; key2=value2; ...} ) — This function is used to void a previously processed payment transaction that has not yet been settled.
- CCRefund ( merchantAccountName ; txKey ; previousTransactionID ; accountNumber ; amountToCredit {; key1=value1; key2=value2; ...} ) — This transaction is also referred to as a "Refund" and indicates to the gateway that money should flow
from the merchant to the customer.
- CCTrackData ( trackData ) — Parses track1 or track2 data, returning extracted data as return-separated values.
- CCValidateCardNumber ( cardNumber ) — Utility function for validating whether a credit card number is valid.
- CCVersion — Returns the version of the credit card plugin which is installed.
- CCVoidPayment ( merchantAccountName ; txKey ; previousTransactionID{; key1=value1; key2=value2; ...} ) — Voids a previously processed payment.
Function Detail
CCCreateSubscription ( merchantAccountName; txKey; dollarAmount; cardNumber; expirationDate; subscriptionNameOrId; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
CCCreateSubscriptionACH ( merchantAccountName; txKey; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
CCGetCardIssuer ( cardNumber )
Returns the card issuer for a given card number. Only works for the following card issuers.
- Visa
- MasterCard
- American Express
- Discover
- Diner's Club
- JCB
is from another issuer.
CCGetLast ( name )
This function returns a value from the most recent transaction response that corresponds to the name
parameter.
Name parameters should be passed as they are listed in the developer documentation for a specific gateway. The following gateways are supported:
- PayPal Website Payments Pro
- InternetSecure
CCLastAmountApproved
CCLastAmountRequested
CCLastAVS
Returns the gateway's Address Verification System Response for the last payment which was processed with {@link
- CCProcessPayment}. To use this, you must first process a payment. If you call this without processing a payment
You must process a payment with the CCProcessPayment function before calling this function
Authorize.net
A = Address (Street) matches, ZIPdoes 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
USA ePay
Code | Alternates | Meaning |
---|---|---|
YYY | Y, YYA, YYD | Address: Match & 5 Digit Zip: Match |
NYZ | Z | Address: No Match & 5 Digit Zip: Match |
YNA | A, YNY | Address: Match & 5 Digit Zip: No Match |
NNN | N, NN | Address: No Match & 5 Digit Zip: No Match |
YYX | X | Address: Match & 9 Digit Zip: Match |
NYW | W | Address: No Match & 9 Digit Zip: Match |
XXW | Card Number Not On File | |
XXU | Address Information not verified for domestic transaction | |
XXR | R, U, E | Retry / System Unavailable |
XXS | S | Service Not Supported |
XXE | Address Verification Not Allowed For Card Type | |
XXG | G,C,I | Global Non-<acronym title="Address Verification System">AVS</acronym> participant |
YYG | B, M | International Address: Match & Zip: Not Compatible |
GGG | D | International Address: Match & Zip: Match |
YGG | P | International Address: No Compatible & Zip: Match |
Note: This feature is currently only implemented for the Authorize.net and USA ePay gateways.
CCLastCCV
CCLastChargeResult
Returns the gateway's result code for the last operation. This code usually indicates the approval, denial or failure of a transaction.
For Authorize.net, the codes are:
- Approved
- Declined
- Error
For Payflow Pro / Verisign, a '0' indicates success; a negative value indicates a failure.
CCLastError
Returns the text of the last error triggered by a plugin function. This should be called immediately after a plugin function returns "ERROR" to get a description of the error.
""
if there was no error.
CCLastPaymentAuthCode
Returns the gateway's approval code for the last payment which was processed with CCProcessPayment. You must process a payment before calling this function. The Payments Gateway gateway requires the value returned by this function to process voids and post-authorizations in addition to the value returned by {@link
- CCLastPaymentTransactionID}.
CCLastPaymentTransactionID
Returns the gateway's transaction ID for the last payment which was processed with CCProcessPayment. This number identifies the transaction in the system and can be used to submit a modification of this transaction at a later time, such as voiding or crediting the transaction.
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.
CCLastRawResponse
This function returns the gateway's raw text response for the most recent transaction.
CCLastRemainingBalance
CCLastSplitTenderId
CCLastSubscriptionID
CCLicenseInfo
Returns information about the license used.
CCModifySubscription ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; cardNumber; expirationDate; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
CCModifySubscriptionACH ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
CCParam ( key ; value )
CCPartialGetRemainingBalance
This function returns the remaining balance for a partial authorization.
CCPartialGetRequestedAmount
This function returns the original amount requested for a partial authorization.
CCProcessAuthorizedPayment ( merchantAccountName ; txKey ; previousTransactionID{; dollarAmount ; key1=value1; key2=value2; ...} )
Processes an authorize-only transaction. See the documentation for the CCProcessPayment function for instructions on how to submit an authorize-only transaction.
The second parameter (txKey
) should be your merchant account password OR your
16-digit authorize.net transaction key. You can obtain an authorize.net transactionKey by logging into <a
href="https://account.authorize.net/">https://account.authorize.net/</a> and going to the Account / Settings /
Transaction key section. If the txKey is not exactly 16 digits, it is assumed to be your authorize.net merchant
account password. Using your account password to approve transactions is not recommended.
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
.
merchantAccountName
- your payment gateway merchant account name
txKey
- your merchant account password OR authorize.net transaction key
previousTransactionID
- the id of the previously authorized transaction to be processed
dollarAmount
- the amount of the transaction
a problem (use CCLastError for more detailed information about the nature of the error)
CCProcessPayment ( merchantAccountName ; txKey ; dollarAmount ; cardNumber ; expirationDate {; key1=value1; key2=value2; ...} )
Processes credit-card payments. The second parameter (txKey
) should be your merchant account
password OR 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. If the txKey is not exactly 16 digits, it is assumed
to be your authorize.net merchant account password. Using your account password to approve transactions is not
recommended. 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
.
merchantAccountName
- your payment gateway merchant account name
txKey
- your merchant account password OR authorize.net transaction key
dollarAmount
- the amount of the transaction
cardNumber
- the credit card account number to charge for the transaction
expirationDate
- the expiration date of the credit card being charged. Format the expiration date as
MMYY or MM/YY or MM/DD/YY
a problem (use CCLastError for more detailed information about the nature of the error)
CCProcessPaymentACH ( merchantAccountName ; txKey ; dollarAmount ; accountNumber ; routingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; checkNumber {; key1=value1; key2=value2; ...} )
Processes an Automated Clearing House (ACH) or eCheck payment. The syntax is similar to that of the
CCProcessPayment
function, except that you must pass in bank account information instead of credit
card information. The USA ePay gateway requires the use of three additional parameters: driversLicenseNumber,
driversLicenseState, ssn. Click here for more information. The
accountType
parameter has three possible values: "checking," "savings," and "business_checking."
If successful, this function returns the unique transactionID
for the transaction (as
assigned by the payment gateway).
merchantAccountName
- your payment gateway merchant account name
txKey
- your merchant account password OR authorize.net transaction key
dollarAmount
- the amount of the transaction
accountNumber
- the account number to debit for the transaction
routingNumber
- the routing number for the account to debit for the transaction
bankName
- the name of the bank
accountType
- the type of account ("checking," "savings," or "business_checking")
accountHolderFirstName
- the first name of the account holder
accountHolderLastName
- the last name of the account holder
checkNumber
- the number of the check (used for back-office transactions)
a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileCreateCustomer ( merchantAccountName; txKey; customerId {; key1=value1; key2=value2; ...} )
This function is used to create a customer profile using Authorize.net's Customer Information Manager system.
merchantAccountName
- your payment gateway merchant account name
txKey
- your merchant account password or authorize.net transaction key
customerId
- merchant-assigned ID for the customer
was a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileCreatePayment ( merchantAccountName; txKey; customerProfileId; cardNumber; expirationDate {; key1=value1; key2=value2; ...} )
This function is used to create a payment profile associated with a customer profile created using Authorize.net's Customer Information Manager system. The credit card information used to generate this profile can later be used to process payments on demand using the CCProfileProcessPayment function.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID, like the one returned by a
successful call to CCProfileCreateCustomer
cardNumber
- the credit card number to use for this payment profile
expirationDate
- the expiration date for the credit card to use for this payment profile
a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileCreatePaymentACH ( merchantAccountName; txKey; customerProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} )
merchantAccountName
txKey
customerProfileId
accountNumber
abaRoutingNumber
bankName
accountType
accountHolderFirstName
accountHolderLastName
CCProfileCreateShipping ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} )
This function is used to create a shipping profile associated with a customer profile.
None of the shipping-related parameters you can pass to this function are required; you must pass them in as additional parameters.
To pass in additional parameters, see the documentation and examples at the top of this document.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID, like the one returned by a
successful call to CCProfileCreateCustomer
was a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileGetCustomer ( merchantAccountName; txKey; customerProfileId )
This function is used to retrieve an existing customer profile.
CCProfileGetPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId )
This function is used to retrieve an existing payment profile.
CCProfileGetShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId )
This function is used to retrieve an existing shipping profile.
CCProfileLastCustomerProfileID
CCProfileLastPaymentProfileID
CCProfileProcessAuthorizedPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; previousTransactionId; dollarAmount {; key1=value1; key2=value2; ...} )
This function is used to process a previously authorized payment using a customer profile.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID
paymentProfileId
- a payment profile ID associated with the customerProfileId
previousTransactionId
- the id of the previously authorized transaction to process
dollarAmount
- the amount of the transaction
was a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileProcessPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; dollarAmount {; key1=value1; key2=value2; ...} )
This function is used to process a credit-card payment using a customer profile created using {@link
- CCProfileCreateCustomer}.
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.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID
paymentProfileId
- a payment profile ID associated with the customerProfileId
dollarAmount
- the amount of the transaction
was a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileRefund ( merchantAccountName; txKey; customerProfileId; paymentProfileId; previousTransactionId; amountToCredit, accountNumber {; key1=value1; key2=value2; ...} )
This function is used to issue a refund for a previously processed payment transaction that has been settled.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID
paymentProfileId
- a payment profile ID associated with the customerProfileId
previousTransactionId
- the id of the transaction to be refunded
amountToCredit
- the refund dollar amount, which must not exceed the full amount of the original
transaction
was a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileVoidPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; previousTransactionId {; key1=value1; key2=value2; ...} )
This function is used to void a previously processed payment transaction that has not yet been settled.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID
paymentProfileId
- a payment profile ID associated with the customerProfileId
previousTransactionId
- the id of the transaction to be voided
was a problem (use CCLastError for more detailed information about the nature of the error)
CCRefund ( merchantAccountName ; txKey ; previousTransactionID ; accountNumber ; amountToCredit {; key1=value1; key2=value2; ...} )
This transaction is also referred to as a "Refund" and indicates to the gateway that money should flow from the merchant to the customer. The gateway will accept a credit or a refund request if the transaction
submitted meets the following conditions:- The transaction is submitted with the ID of the original transaction against which the credit is being issued (x_trans_id).
- The gateway has a record of the original transaction.
- The original transaction has been settled (note that this means it will probably
not work on the same day that the charge was run). To refund charges that are on the same day, use CCVoidPayment
instead. This parameter is ignored by the Payments Gateway gateway, so you may pass in any text value. -
The sum of the amount submitted in the Credit transaction and all credits submitted against the original
transaction is less than the original transaction amount. - The full or last four digits of the credit
card number submitted with the credit transaction match the full or last four digits of the credit card number used in the original transaction. The exception to this rule is the Payments Gateway gateway, which requires the
full credit card number. - The transaction is submitted within 120 days of the settlement date and time of the original transaction.
To pass in additional parameters, see the documentation and examples at the top of this
document. To use this function with the Payments Gateway gateway, you must pass in the following information in
- credit card expiration date
- cardholder first name
- cardholder last name
merchantAccountName
- your payment gateway merchant account name
txKey
- your merchant account password OR authorize.net transaction key.
previousTransactionID
- the transactionId of a previously processed transaction.
accountNumber
- the credit card or bank account number to credit for the transaction. For credit
card refunds, you may either pass the entire card number, or just the last 4 digits.
amountToCredit
- the amount to credit, as a positive number. Must be less than the original
transaction amount. If a negative number is passed the absolute value is used.
problem (use CCLastError for more detailed information about the nature of the error)
CCTrackData ( trackData )
Parses track1 or track2 data, returning extracted data as return-separated values. This is convenient if you're swiping card data and want to save the cardholder name to your database, for example. Note: When passing track1 data to the CCProcessPayment function, use the raw swipe data from the card, not this parsed version!
Use theGetValue
function in FileMaker to get the following specific values: - Account Code
- Cardholder Name with leading & trailing whitespace removed (this will be empty for track2 data)
- Expiration Date (YYMM format)
- Optional Discretionary Data
Sample Usage
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 reader
discretionary data
CCValidateCardNumber ( cardNumber )
Utility function for validating whether a credit card number is valid. This only checks the format of the card number, not whether it is an active account.
This 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 dashes
CCVersion
Returns the version of the credit card plugin which is installed.
CCVoidPayment ( merchantAccountName ; txKey ; previousTransactionID{; key1=value1; key2=value2; ...} )
Voids a previously processed payment. The parameters are similar to the CCProcessPayment function,
except dollarAmount
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 {@link
- 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. In order to use this function, the Payments Gateway gateway requires that you pass in an additional
parameter called authCode
. This refers to the original authorization code returned by the Payments
Gateway gateway, which can be retrieved via a call to the CCLastPaymentAuthCode function.
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" )
merchantAccountName
- your payment gateway merchant account name
txKey
- your merchant account password OR authorize.net transaction key.
previousTransactionID
- 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.
problem (use CCLastError for more detailed information about the nature of the error)