Difference between revisions of "FirstData"
(changed to gateway specific creds) |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
==Working with Plug-ins== | ==Working with Plug-ins== | ||
− | Plastic | + | Plastic is a plug-in for FileMaker Pro and FileMaker Server that processes secure payments within FileMaker. |
{{Template:Plugin Basics}} | {{Template:Plugin Basics}} | ||
Line 7: | Line 7: | ||
==First Data== | ==First Data== | ||
− | First Data can process a wide variety of transactions, including card swipes, eCheck / ACH payments, and subscriptions. For detailed examples of each of these transactions, check the demo file included as a download with Plastic | + | First Data can process a wide variety of transactions, including card swipes, eCheck / ACH payments, and subscriptions. For detailed examples of each of these transactions, check the demo file included as a download with Plastic. These scripts are ready for insertion into your own solution! |
+ | |||
+ | === Getting an account === | ||
+ | |||
+ | You'll need an account using the [https://www.firstdata.com/en_us/home.html First Data Gateway], and use your '''user ID''' and the '''password''' as the first two parameters for every plug-in function call that performs a transaction. In the function signature template, you may see the terms ''merchant account name'' and ''transaction key'' instead of user ID and password. This is due to the fact that Plastic supports many gateways that use different definitions of log-in credentials. | ||
+ | |||
+ | Set Variable [ $result; Value: | ||
+ | CCProcessPayment ( | ||
+ | userID; | ||
+ | password; ...) ] | ||
=== Setting the Gateway === | === Setting the Gateway === | ||
− | Before processing any payments, you need to tell Plastic which gateway you are using. This is done by calling CCSetGateway. If you have a card present account, pass in cardPresent=true. | + | Before processing any payments, you need to tell Plastic which gateway you are using. This is done by calling CCSetGateway. If you have a card-present (retail) merchant account, pass in cardPresent=true as the second parameter. |
<pre>Set Variable [$gateway; Value:CCSetGateway("First Data"; "cardPresent=true")]</pre> | <pre>Set Variable [$gateway; Value:CCSetGateway("First Data"; "cardPresent=true")]</pre> | ||
− | As a First Data customer, | + | '''Returns''': 1 if a valid gateway is provided, ERROR otherwise. |
+ | |||
+ | ====Security Certificate Requirements==== | ||
+ | |||
+ | As a First Data customer you have access to several security certificates, one of which must be used to interface with their Global Gateway Web Service. You can find these certificates by logging into your Global Gateway merchant account online and navigating to <b>Support</b>, then <b>Download Center</b>. Be sure to click the link labeled <b>For Web Service</b>. The download will contain several files, including one that ends with <b>auth.txt</b>. This file contains your user name and password, which will correspond to the first two parameters of any plug-in function that actually sends a request to the gateway. The file that has a <b>.ks</b> extension should be inserted in a container field in your solution and supplied as the first of two parameters to the <code>CCSetCertificate</code> function. The second parameter is a password found in the file that ends with <b>.ks.pw.txt</b>. | ||
<pre>Set Variable [$cert; Value:CCSetCertificate ( certificate ; password )]</pre> | <pre>Set Variable [$cert; Value:CCSetCertificate ( certificate ; password )]</pre> | ||
+ | |||
+ | '''Returns''': 1 if a valid certificate is provided, ERROR otherwise. | ||
+ | |||
+ | Where to find the certificate in the gateway. | ||
+ | |||
+ | Step 1: | ||
+ | |||
+ | [[File:FirstDataGetCredentials1.png|500px|]] | ||
+ | |||
+ | Step 2: | ||
+ | |||
+ | [[File:FirstDataGetCredentials2.png|500px|]] | ||
+ | |||
+ | ===Test Mode=== | ||
+ | |||
+ | {{Template:Test Mode}} | ||
+ | |||
+ | {{Template:Emulators}} | ||
==Processing Payments== | ==Processing Payments== | ||
Line 155: | Line 186: | ||
|||"driversLicenseState | |||"driversLicenseState | ||
|} | |} | ||
+ | |||
+ | '''Returns''': a subscription ID if the subscription has been successful, "ERROR" if there was a problem. | ||
After a subscription has been created, it can be modified with '''CCModifySubscription'''. If the original subscription was a bank account you'll use '''CCModifySubscriptionACH'''. | After a subscription has been created, it can be modified with '''CCModifySubscription'''. If the original subscription was a bank account you'll use '''CCModifySubscriptionACH'''. | ||
Line 210: | Line 243: | ||
|previousSubscriptionId | |previousSubscriptionId | ||
|} | |} | ||
+ | |||
+ | '''Returns''': 1 on success, or "ERROR" if there was a problem. | ||
There are no optional parameters with deleting a subscription. | There are no optional parameters with deleting a subscription. |
Latest revision as of 18:58, 27 November 2023
Working with Plug-ins
Plastic is a plug-in for FileMaker Pro and FileMaker Server that processes secure payments within FileMaker.
Requirements
FileMaker 7 or higher, Java Virtual Machine (JVM) 6 or higher, Windows or Mac OS X 10.6. Rosetta on Intel Macs not supported.
Installation
If you unzip the zip archive containing the plug-in files and open the top-level directory, you will find two subdirectories labeled WIN (for Windows) and MAC (for Macintosh). The WIN directory contains two plug-in files, one with a .fmx extension and another with a .fmx64 extension. The file with the .fmx64 extension is only used for FileMaker Server installations, which are explained below. The MAC directory contains a plug-in file with a .fmplugin extension.
To install the plug-in, copy the plug-in from the WIN or MAC folder to one of the directories listed below. Directory paths are listed relative to the parent directory of the installation home directory of the FileMaker application.
FileMaker Pro
FileMaker Pro XX/Extensions
FileMaker Pro XX Advanced/Extensions
FileMaker Server Web Publishing Engine (applies to the entire Web Publishing Engine prior to FileMaker Server 12.0.2 and to Instant Web Publishing only for FileMaker Server 12.0.2 and later)
FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins (create the Plugins folder if it does not exist)
FileMaker Server Custom Web Publishing (applies only to FileMaker Server 12.0.2 and later)
FileMaker Server/Web Publishing/publishing-engine/cwpc/Plugins (create the Plugins folder if it does not exist)
Note: For 64-bit versions of Windows, be sure to use the 360Works plug-in with a .fmx64 extension
FileMaker Server Scripting Engine (applies to FileMaker Server scheduled scripts)
FileMaker Server/Database Server/Extensions
Note: Using the plug-in with the FileMaker Server Web Publishing Engine or the FileMaker Server Scripting Engine requires an Enterprise plug-in license.
Uninstalling the plug-in
Uninstall the plug-in by quitting FileMaker Pro or stopping FileMaker Server and removing the plug-in file from the appropriate Extensions or Plugins directory.
Demo mode and registering the plug-in
Plug-ins will run in a fully featured demo mode until they are registered. While running in demo mode, the plug-in will run for 2 hours at a time. In order to get another two hours of demo time, you must restart FileMaker Pro, FileMaker Server's database server module or FileMaker Server's Web Publishing Engine, depending upon where the plug-in is installed.
To register the plug-in in FileMaker Pro, you may either enter the license information in FileMaker plug-in preferences or by calling CCRegister
inside a script. You must call CCRegister
inside a script in order to register the plug-in for use with FileMaker Server.
Set Variable [ $register; Value: CCRegister ( $licenseKey, $registeredToName) ]
Returns: a 1 on success or a 0 on failure.
Error Handling/Reporting
When something unexpected happens, the plug-in will pop up a dialog showing what the error message is. This makes it easy to see what went wrong. However, in some cases, you (the developer) may prefer to show your own message to the user, or possibly not show a message at all. In that case, you can call CCSetErrorCapture ( true )
. This will suppress the displaying of error dialogs.
Whether or not you suppress the error dialogs, a plugin function will return the word "ERROR" if something goes wrong. It's a good idea to check the result of each plugin function call to determine if an error occurred. If an error occurs, use the CCLastError function to get a detailed message describing the error. For example:
Set Variable [ $result = MyPluginFunction("x" ; "y" ; "z") ] If [ $result = "ERROR" ] Show Custom Dialog [ "An error occurred: " & CCLastError ] End If
If a plug-in is not installed correctly, all plug-in function calls will return "?"
To check if a transaction succeeded
The simplest way to check to see if money has changed hands in a payment processing function call is to check the result of the function itself. This is extremely useful when calling functions such as CCProcessPayment and CCProfileProcessPayment
. The result of the transaction will give a transaction ID or the word ERROR. Using the CCLastError
like in the example above will give further information about the error, such as if there is no network connectivity, or the card was declined.
Set Variable[$result ; CCProcessPayment(...)] If[$result = "ERROR"] #Transaction is unsuccessful. Below is an example of how you might handle the error. Set Field[Transaction::Error Message ; CCLastError] Else #Transaction is successful. Set Field[Transaction::Transaction ID ; $result] End If
More Information
For more information on how to correctly install and work with plug-ins, check out the Plugins 101 documentation.
First Data
First Data can process a wide variety of transactions, including card swipes, eCheck / ACH payments, and subscriptions. For detailed examples of each of these transactions, check the demo file included as a download with Plastic. These scripts are ready for insertion into your own solution!
Getting an account
You'll need an account using the First Data Gateway, and use your user ID and the password as the first two parameters for every plug-in function call that performs a transaction. In the function signature template, you may see the terms merchant account name and transaction key instead of user ID and password. This is due to the fact that Plastic supports many gateways that use different definitions of log-in credentials.
Set Variable [ $result; Value: CCProcessPayment ( userID; password; ...) ]
Setting the Gateway
Before processing any payments, you need to tell Plastic which gateway you are using. This is done by calling CCSetGateway. If you have a card-present (retail) merchant account, pass in cardPresent=true as the second parameter.
Set Variable [$gateway; Value:CCSetGateway("First Data"; "cardPresent=true")]
Returns: 1 if a valid gateway is provided, ERROR otherwise.
Security Certificate Requirements
As a First Data customer you have access to several security certificates, one of which must be used to interface with their Global Gateway Web Service. You can find these certificates by logging into your Global Gateway merchant account online and navigating to Support, then Download Center. Be sure to click the link labeled For Web Service. The download will contain several files, including one that ends with auth.txt. This file contains your user name and password, which will correspond to the first two parameters of any plug-in function that actually sends a request to the gateway. The file that has a .ks extension should be inserted in a container field in your solution and supplied as the first of two parameters to the CCSetCertificate
function. The second parameter is a password found in the file that ends with .ks.pw.txt.
Set Variable [$cert; Value:CCSetCertificate ( certificate ; password )]
Returns: 1 if a valid certificate is provided, ERROR otherwise.
Where to find the certificate in the gateway.
Step 1:
Step 2:
Test Mode
To run test transactions, call CCSetTestMode
- If set to 1, tells Plastic to perform all subsequent transactions as test transactions. If set to 0, tells Plastic to perform all subsequent transactions as live transactions. If this function is never called, the default behavior of Plastic is to treat all transactions as live transactions.
Emulators And Alternate URLs
If you would like to use Plastic to perform transactions against an alternate URL, call the CCSetGateway function with the additional parameter url, whose value would correspond to the alternate url. A gateway emulator is a common use case for an alternate URL. Gateway emulators fashion an application programming interface that resembles that of a competing gateway to ease the integration process for merchants who switch to their gateway.
Example of communicating with a gateway that provides an Authorize.Net emulator at the URL http://AlternateURLGoesHere.com
Set Variable [$result; Value:CCSetGateway ("Authorize.Net" ; "url=http://AlternateURLGoesHere.com/")]
The call to CCSetGateway acts as a flag, so all subsequent transactions will point to the alternate URL until otherwise specified or FileMaker is restarted.
Processing Payments
Basic Credit Card Charge
Once you properly configure your merchant account, you can quickly and easily process payment transactions.
You must provide the following information for 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)
- dollar amount
- credit card number
- credit card expiration date (Format the expiration date as MMYY or MM/YY or MM/DD/YY)
The CCProcessPayment function will process a 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.
In your script, you would then have a second line after setting the gateway.
Set Variable [$result Value: CCProcessPayment( userID; password; chargeAmount; cardNumber; expDate)]
Returns: a verification code from the payment gateway service if the order is successful, or "ERROR" if there was a problem
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.
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.
Set Variable [$result Value: CCProcessPayment( userID; password; chargeAmount; cardNumber; expDate; "chargeDescription=" & Payment::description; "verificationCode=" & $securityCode)]
Parameter | Description |
---|---|
verificationCode | the numeric verification code on the credit card. This is also known as Card Security Code (CSC), Card Verification Value (CVV), Card Verification Value Code (CVVC), Card Verification Code (CVC) or Verification Code (V-Code/V Code) |
orderId | an arbitrary order number for your records |
invoiceNumber | an arbitrary invoice number for your records |
poNumber | an arbitrary invoice number for your records |
chargeDescription | brief description of the charges |
customerId | an arbitrary customer ID for your records |
companyName | the billing company name |
firstName | First (given) name of the credit card holder |
lastName | Last (surname) of the credit card holder |
the card holder's email address | |
fax | the card holder's fax number |
phone | the card holder's phone number |
address | the billing address |
address2 | the second line of the billing address |
city | the billing address city |
state | the billing address state |
zip | the billing address zip |
country | billing address country |
shipAddress | the shipping street address |
shipCity | the shipping address city |
shipAddress2 | the shipping address second line |
shipFax | the shipping fax number |
shipCountry | the shipping address country |
shipFirstName | the shipping recipient's first name |
shipLastName | the shipping recipient's last name |
shipState | the shipping address state |
shipZip | the shipping address zip |
Processing ACH payments
Plastic now supports payments via direct bank transfers and eChecks, via ACH payments. To take a payment via eCheck, use the CCProcessPaymentACH function after calling the gateway. The exact parameters that are required vary by gateway, but a typical example would look like:
Set Variable [$result; Value: CCProcessPaymentACH ( userID; password; dollarAmount; accountNumber; routingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; checkNumber; "achType=ARC" )]
Returns: a verification code from the payment gateway service if the order is successful, or "ERROR" if there was a problem
Parameter | Description |
---|---|
verificationCode | the numeric verification code on the credit card. This is also known as Card Security Code (CSC), Card Verification Value (CVV), Card Verification Value Code (CVVC), Card Verification Code (CVC) or Verification Code (V-Code/V Code) |
orderId | an arbitrary order number for your records |
invoiceNumber | an arbitrary invoice number for your records |
poNumber | an arbitrary invoice number for your records |
chargeDescription | brief description of the charges |
customerId | an arbitrary customer ID for your records |
companyName | the billing company name |
firstName | First (given) name of the credit card holder |
lastName | Last (surname) of the credit card holder |
the card holder's email address | |
fax | the card holder's fax number |
phone | the card holder's phone number |
address | the billing address |
address2 | the second line of the billing address |
city | the billing address city |
state | the billing address state |
zip | the billing address zip |
country | billing address country |
shipAddress | the shipping street address |
shipCity | the shipping address city |
shipAddress2 | the shipping address second line |
shipFax | the shipping fax number |
shipCountry | the shipping address country |
shipFirstName | the shipping recipient's first name |
shipLastName | the shipping recipient's last name |
shipState | the shipping address state |
shipZip | the shipping address zip |
Authorizing and Capturing Payments
A sale transaction for credit card contains two parts: an authorization which verifies and places a hold for the amount, and a capture, which actually transfers the funds.
To run an authorization, pass in an additional parameter authMode=AUTH_ONLY.
Set Variable [$result Value: CCProcessPayment( userID, password; chargeAmount; cardNumber; expDate; authMode=AUTH_ONLY)]
Returns: a verification code from the payment gateway service if the order is successful, or "ERROR" if there was a problem
After running an authorization, run the appropriate CCProcessAuthorizedPayment. Pass in the previousTransactionId from the transaction ID you received from the process with authMode.
Parameter | Description |
---|---|
verificationCode | the numeric verification code on the credit card. This is also known as Card Security Code (CSC), Card Verification Value (CVV), Card Verification Value Code (CVVC), Card Verification Code (CVC) or Verification Code (V-Code/V Code) |
orderId | an arbitrary order number for your records |
invoiceNumber | an arbitrary invoice number for your records |
poNumber | an arbitrary invoice number for your records |
chargeDescription | brief description of the charges |
customerId | an arbitrary customer ID for your records |
companyName | the billing company name |
firstName | First (given) name of the credit card holder |
lastName | Last (surname) of the credit card holder |
the card holder's email address | |
fax | the card holder's fax number |
phone | the card holder's phone number |
address | the billing address |
address2 | the second line of the billing address |
city | the billing address city |
state | the billing address state |
zip | the billing address zip |
country | billing address country |
shipAddress | the shipping street address |
shipCity | the shipping address city |
shipAddress2 | the shipping address second line |
shipFax | the shipping fax number |
shipCountry | the shipping address country |
shipFirstName | the shipping recipient's first name |
shipLastName | the shipping recipient's last name |
shipState | the shipping address state |
shipZip | the shipping address zip |
Set Variable $result Value: CCProcessAuthorizedPayment( userID, password; previousTransactionId; dollarAmount)
The dollarAmount is not required to process the authorized payment.
Using Card Readers
Certain types of merchant accounts are set up for reading physical card swipes, instead of taking orders via the web or over the phone. If you account is a card present account, like a retail store, then you will need to also send the data included on the magnetic stripe of a card. It is important to pass in swipe data if you have it, as your transaction may be downgraded to a more expensive rate if you simply type a card number.
First, set the gateway with card present parameter
To process a card present transaction, first call CCSetGateway with the parameter cardPresent=true. If CCSetGateway returns a 1, then you can perform a card present transaction.
Second, determine your Track 1 and 2 formats
To process a payment using card present accounts, you'll need the information in the magnetic stripe of the credit card. In Plastic, this information may be obtained from a keyboard-emulating card reader, which essentially dumps text into a text field when the card is swiped, as if the text had been entered via a keyboard.
While some card readers will contain software that parses that raw data from the magnetic stripe before dumping it to a field, this documentation refers to those keyboard-emulating readers that dump raw data. Raw swipe data contains two delimited pieces of information: Track 1 and Track 2.
Raw data would look something like this:
%B1234123412341234^LAST/FIRSTM^1112101000000000011100111000000?;1234123412341234=11121010000000000111?
Track 1 is delimited by a percent symbol and a question mark, so in the previous example Track 1 would be:
%B1234123412341234^LAST/FIRST/^1112101000000000011100111000000?
Track 2 is delimited by a semicolon and question mark, so in the previous example Track 2 would be:
;1234123412341234=11121010000000000111?
See http://www.exeba.com/comm40/creditcardformat.htm for more information about Track 1 and Track 2.
Note: As a convenience, the Plastic function CCTrackData will parse either Track 1 or Track 2 data as a return-separated string containing account code, cardholder name, expiration date (YYMM), and optional discretionary data.
Process the payment with CCProcessPayment
Finally, call CCProcessPayment and pass in raw swipe or track data. When processing a card-present transaction, a gateway will typically require you to pass in either the full raw swipe, Track 1 or Track 2. In most cases, you do not need to pass in card numbers and expiration dates.
Set Variable [$result; Value: CCProcessPayment( userID; password; chargeAmount; ""; ""; "swipe=%B1234123412341234^LAST/FIRSTM^1112101000000000011100111000000?;1234123412341234=11121010000000000111?")]
Voiding Transactions
Set Variable [$result; Value: CCVoidPayment ( userID ; password ; previousTransactionID)]
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 transaction ID 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.
Parameters:
userID - your payment gateway merchant account name
password - your merchant account password OR transaction key.
previousTransactionID - the transactionId of a previously processed transaction.
Note that CCVoidPayment 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 CCRefund instead.
Returns: the transactionID from the payment gateway service if the order is successful, or "ERROR" if there was a problem
See also: CCLastPaymentTransactionID: the transactionID from the payment gateway service if the order is successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error).
Crediting or Refunding Transactions
To credit a transaction, you need the transaction ID returned by 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.
Set Variable [$result; Value: CCRefund( userID; password; transactionID; cardNumber; dollarAmount)]
Returns: the transactionID from the payment gateway service if the order is successful, or "ERROR" if there was a problem
Parameter | Description |
---|---|
verificationCode | the numeric verification code on the credit card. This is also known as Card Security Code (CSC), Card Verification Value (CVV), Card Verification Value Code (CVVC), Card Verification Code (CVC) or Verification Code (V-Code/V Code) |
orderId | an arbitrary order number for your records |
invoiceNumber | an arbitrary invoice number for your records |
poNumber | an arbitrary invoice number for your records |
chargeDescription | brief description of the charges |
customerId | an arbitrary customer ID for your records |
companyName | the billing company name |
firstName | First (given) name of the credit card holder |
lastName | Last (surname) of the credit card holder |
the card holder's email address | |
fax | the card holder's fax number |
phone | the card holder's phone number |
address | the billing address |
address2 | the second line of the billing address |
city | the billing address city |
state | the billing address state |
zip | the billing address zip |
country | billing address country |
shipAddress | the shipping street address |
shipCity | the shipping address city |
shipAddress2 | the shipping address second line |
shipFax | the shipping fax number |
shipCountry | the shipping address country |
shipFirstName | the shipping recipient's first name |
shipLastName | the shipping recipient's last name |
shipState | the shipping address state |
shipZip | the shipping address zip |
You can also use CCRefund to do an unlinked credit, which will run a refund of the amount without requiring a transaction ID. Pass in blank values ""; for the previous transaction ID to perform this type of transaction.
To do an unlinked credit with First Data, pass in the blank transaction ID. It will be a little different based on whether it was a swiped or a typed card:
Card Not Present Unlinked Refund | Card Present Unlinked Refund |
Set Variable $result Value: CCRefund( userID, password; ""; cardNumber; amountToCredit; "expirationDate=12/13") |
Set Variable $result Value: CCRefund( userID, password; ""; ""; amountToCredit; "swipe=") |
Subscription Services
With subscriptions, payments can automatically be debited to a credit card or a bank account on a time period you specify. If you gateway supports it, there may be up to five functions used to manage subscriptions: CCCreateSubscription, CCCreateSubscriptionACH, CCModifySubscription, CCModifySubscriptionACH, and CCDeleteSubscription.
First Data supports all five subscription functions. Creating and modifying subscriptions all accept the same optional parameters, available in the table below.
To create a credit card subscription, use CCCreateSubscription. To create a bank account subscription, use CCCreateSubscriptionACH. Do not pass in a subscription name. You'll also need to set a maximum number of failures using the key=value syntax.
Valid pay periods may include monthly, yearly and the like. Frequency indicates how often in that period. For example, a biweekly subscription would have a pay period of weekly and a frequency of 2. The number of installments specify how many transactions to run total.
CCCreateSubscription | CCCreateSubscriptionACH |
userID | userID |
password | password |
dollarAmount | dollarAmount |
cardNumber | accountNumber |
expDate | abaRoutingNumber |
""; | ""; |
numberOfInstallments | accountType |
startDate | ""; |
payPeriod | ""; |
frequency | ""; |
"maximumFailures=" | numberOfInstallments |
startDate | |
payPeriod | |
frequency | |
"maximumFailures=" | |
"driversLicenseNumber=" | |
"driversLicenseState |
Returns: a subscription ID if the subscription has been successful, "ERROR" if there was a problem.
After a subscription has been created, it can be modified with CCModifySubscription. If the original subscription was a bank account you'll use CCModifySubscriptionACH.
CCModifySubscription | CCModifySubscriptionACH |
userID | userID |
password | password |
previousSubscriptionId | previousSubscriptionId |
dollarAmmount | dollarAmount |
cardNumber | accountNumber |
expirationDate | abaRoutingNumber |
""; | ""; |
numberOfInstallments | accountType |
startDate | ""; |
payPeriod | ""; |
frequency | ""; |
"maximumFailures=" | numberOfInstallments |
startDate | |
payPeriod | |
frequency | |
"maximumFailures=" |
Modifying and creating subscriptions accepts the following:
Parameter | Description |
---|---|
verificationCode | the numeric verification code on the credit card. This is also known as Card Security Code (CSC), Card Verification Value (CVV), Card Verification Value Code (CVVC), Card Verification Code (CVC) or Verification Code (V-Code/V Code) |
orderId | an arbitrary order number for your records |
invoiceNumber | an arbitrary invoice number for your records |
poNumber | an arbitrary invoice number for your records |
chargeDescription | brief description of the charges |
customerId | an arbitrary customer ID for your records |
companyName | the billing company name |
firstName | First (given) name of the credit card holder |
lastName | Last (surname) of the credit card holder |
the card holder's email address | |
fax | the card holder's fax number |
phone | the card holder's phone number |
address | the billing address |
address2 | the second line of the billing address |
city | the billing address city |
state | the billing address state |
zip | the billing address zip |
country | billing address country |
shipAddress | the shipping street address |
shipCity | the shipping address city |
shipAddress2 | the shipping address second line |
shipFax | the shipping fax number |
shipCountry | the shipping address country |
shipFirstName | the shipping recipient's first name |
shipLastName | the shipping recipient's last name |
shipState | the shipping address state |
shipZip | the shipping address zip |
To cancel a subscription, use CCDeleteSubscription:
CCDeleteSubscription |
userID |
password |
previousSubscriptionId |
Returns: 1 on success, or "ERROR" if there was a problem.
There are no optional parameters with deleting a subscription.
Getting Information
Plastic includes a number of helper functions that allow users to retrieve data from the gateway or Plastic.
To execute any of these functions inside of a script, use a Set Field or Set Variable script step.
- CCGetCardIssuer(cardNumber) - returns the card issuer for a given card number, either: VISA, MASTERCARD, AMEX, DINERS, DISCOVER, JCB. Returns an error if the card number is from another issuer.
- CCGetLast (name) - returns a value from the most recent transaction response that corresponds with the name parameter.
- CCLastAVS- returns the gateway's Address Verification System Response for the last payment which was processed. This response is typically a one letter indicator, meaning the following:
Code | Description | Network |
---|---|---|
A | Street address matches, but 5-digit and 9-digit postal code do not match. | Standard domestic |
B | Street address matches, but postal code not verified. | Standard international |
C | Street address and postal code do not match. | Standard international |
D | Street address and postal code match. Code "M" is equivalent. | Standard international |
E | AVS data is invalid or AVS is not allowed for this card type. | Standard domestic |
G | Non-U.S. issuing bank does not support AVS. | Standard international |
I | Address not verified. | Standard international |
M | Street address and postal code match. Code "D" is equivalent. | Standard international |
N | Street address and postal code do not match. | Standard domestic |
P | Postal code matches, but street address not verified. | Standard international |
R | System unavailable. | Standard domestic |
S | Bank does not support AVS. | Standard domestic |
U | Address information unavailable. Returned if the U.S. bank does not support non-U.S. AVS or if the AVS in a U.S. bank is not functioning properly. | Standard domestic |
W | Street address does not match, but 9-digit postal code matches. | Standard domestic |
X | Street address and 9-digit postal code match. | Standard domestic |
Y | Street address and 5-digit postal code match. | Standard domestic |
Z | Street address does not match, but 5-digit postal code matches. | Standard domestic |
- CCLastCCV- returns the gateway's Card Code Verification Response for the last payment which was processed. This response is typically a one letter indicator, meaning the following:
- M- CVV2/CVC2 Match - Indicates that the card is authentic. Complete the transaction if the authorization request was approved.
- N- CVV2 / CVC2 No Match – May indicate a problem with the card. Contact the cardholder to verify the CVV2 code before completing the transaction, even if the authorization request was approved.
- P- Not Processed - Indicates that the expiration date was not provided with the request, or that the card does not have a valid CVV2 code. If the expiration date was not included with the request, resubmit the request with the expiration date.
- S- Merchant Has Indicated that CVV2 / CVC2 is not present on card - May indicate a problem with the card. Contact the cardholder to verify the CVV2 code before completing the transaction.
- U- Issuer is not certified and/or has not provided visa encryption keys
- CCLastChargeResult - returns the gateway's result code for the last operation.
- CCLastPaymentAuthCode - returns the gateway's approval code for the last payment which was processed with CCProcessPayment.
- CCLastPaymentTransactionID- returns the gateway's transaction ID for the last payment which was processed with CCProcessPayment.
- CCLastRawResponse- returns the gateway's raw text response for the most recent transaction.
- CCValidateCardNumber (cardNumber) determines if a card number is valid. Does not indicate the validity of the card itself, only its number. Returns either a 1 for valid card, or 0 for invalid cards.
- CCLastError - returns the text of the last error triggered by a plugin function.
- CCLicenseInfo - returns information about the license used.
- CCVersion - returns the version of the credit card plugin which is installed.
Getting Help
If you still need help, there are several resources available! FMForums hosts a support forum for 360Works products. Please look through the posts and see if your question has been posted before making a new topic.
Support is also available via email at plugins@360works.com. You can also call us at 770-234-9293. We offer many services in addition to our plug-ins, so let us know if you'd like a little help integrating the plug-in into your solution. Or if you'd be interested in a customized plug-in or development please let us know!