360Works Plastic/Documentation
WikiEditTask (Talk | contribs) m (Auto-upload documentation) |
WikiEditTask (Talk | contribs) m (Auto-upload documentation) |
||
Line 1: | Line 1: | ||
=360Works Plastic User Guide= | =360Works Plastic User Guide= | ||
− | + | Plastic provides easy credit card processing capabilities for FileMaker Pro. | |
<h3>Using the plugin</h3> | <h3>Using the plugin</h3> | ||
− | |||
− | |||
− | + | Consult the "Plastic Example.fp7" Filemaker file for examples of plugin usage. | |
− | <a href=" | + | |
− | < | + | |
− | < | + | 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> | ||
+ | |||
+ | |||
+ | <ul> | ||
+ | <li><a href="http://www.authorize.net/solutions/merchantsolutions/">Authorize.Net</a></li> | ||
+ | <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside">Payflow Pro</a></li> | ||
+ | <li><a href="https://www3.moneris.com/connect/en/index.php">eSELECTplus</a></li> | ||
+ | <li><a href="http://www.firstdata.com/product_solutions/ecommerce/global_gateway/index.htm">First Data</a></li> | ||
+ | <li><a href="https://www.usaepay.com/">USA ePay</a></li> | ||
+ | <li><a href="http://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside">PayPal Website Payments Pro*</a></li> | ||
+ | </ul> | ||
+ | |||
+ | * - 360Works Plastic only supports refund transactions when using the Website Payments Pro gateway | ||
+ | </p> | ||
+ | |||
<h4>Selecting a gateway provider</h4> | <h4>Selecting a gateway provider</h4> | ||
− | |||
− | |||
− | + | 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|CCSetGateway]] and passing in the name of your gateway. | ||
− | |||
− | <h4> | + | 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 <code>CCSetGateway</code> 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 <code>CCSetGateway</code> using the following syntax: | ||
+ | |||
+ | |||
+ | CCSetGateway("Authorize.Net"; "cardPresent=true") | ||
+ | |||
+ | |||
+ | <h4>Processing Payments</h4> | ||
+ | |||
+ | Once you properly configure your merchant account, you can quickly and easily process payment transactions. | ||
+ | |||
− | |||
CCProcessPayment( | CCProcessPayment( | ||
+ | |||
merchantAccount; | merchantAccount; | ||
transactionKey; | transactionKey; | ||
Line 28: | Line 78: | ||
cardNumber; | cardNumber; | ||
expDate | expDate | ||
+ | |||
) | ) | ||
+ | </p> | ||
− | |||
− | |||
− | It is important | + | The [[#CCProcessPayment|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 <code>ERROR</code> | ||
+ | if the transaction fails. For detailed information about the most recent transaction failure, call the | ||
+ | <code>CCLastError</code> function <em>before calling any other transaction-processing function.</em> | ||
+ | </p> | ||
+ | |||
+ | |||
+ | <em>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.</em> | ||
+ | </p> | ||
+ | |||
+ | <h5>Information required to process a credit-card payment transaction</h5> | ||
− | |||
<ul> | <ul> | ||
− | <li> | + | <li>merchant account name (this might also be known as a store id)</li> |
− | <li> | + | <li>transaction key (this might also be known as a password or token) </li> |
<li>credit card number</li> | <li>credit card number</li> | ||
<li>credit card expiration date</li> | <li>credit card expiration date</li> | ||
<li>dollar amount</li> | <li>dollar amount</li> | ||
</ul> | </ul> | ||
− | + | ||
− | + | ||
− | + | <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( | CCProcessPayment( | ||
+ | |||
merchantAccount; | merchantAccount; | ||
transactionKey; | transactionKey; | ||
Line 55: | Line 123: | ||
cardNumber; | cardNumber; | ||
expDate; | expDate; | ||
− | "chargeDescription=" & description; | + | "chargeDescription=" & Payment::description; |
− | "cardType=" | + | "cardType=MasterCard"; |
− | "verificationCode=" & securityCode | + | "verificationCode=" & $securityCode |
+ | |||
) | ) | ||
− | Here is a list of | + | Here is a list of all valid additional parameters: |
<dl> | <dl> | ||
− | + | <dt>firstName</dt><dd>First (given) name of the credit card holder</dd> | |
− | <dt>firstName</dt><dd> | + | <dt>lastName</dt><dd>Last (surname) of the credit card holder</dd> |
− | <dt>lastName</dt><dd> | + | |
− | + | ||
<dt>chargeDescription</dt><dd>brief description of the charges</dd> | <dt>chargeDescription</dt><dd>brief description of the charges</dd> | ||
<dt>verificationCode</dt><dd>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> | <dt>verificationCode</dt><dd>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> | ||
Line 73: | Line 140: | ||
<dt>poNumber</dt><dd>an arbitrary purchase order number for your records</dd> | <dt>poNumber</dt><dd>an arbitrary purchase order number for your records</dd> | ||
<dt>customerId</dt><dd>an arbitrary customer id for your records</dd> | <dt>customerId</dt><dd>an arbitrary customer id for your records</dd> | ||
+ | <dt>orderId</dt><dd>a unique id for a particular transaction (Required by Moneris)</dd> | ||
<dt>address</dt><dd>the billing address street address</dd> | <dt>address</dt><dd>the billing address street address</dd> | ||
<dt>unitNumber</dt><dd>the billing unit/apt no.</dd> | <dt>unitNumber</dt><dd>the billing unit/apt no.</dd> | ||
Line 81: | Line 149: | ||
<dt>phone</dt><dd>the cardholder's phone numer</dd> | <dt>phone</dt><dd>the cardholder's phone numer</dd> | ||
<dt>fax</dt><dd>the cardholder's fax numer</dd> | <dt>fax</dt><dd>the cardholder's fax numer</dd> | ||
+ | <dt>email</dt><dd>the cardholder's email address</dd> | ||
+ | <dt>companyName</dt><dd>the billing company name</dd> | ||
<dt>shipFirstName</dt><dd>the shipping recipient's first name</dd> | <dt>shipFirstName</dt><dd>the shipping recipient's first name</dd> | ||
<dt>shipLastName</dt><dd>the shipping recipient's last name></dd> | <dt>shipLastName</dt><dd>the shipping recipient's last name></dd> | ||
Line 88: | Line 158: | ||
<dt>shipZip</dt><dd>the shipping address zip</dd> | <dt>shipZip</dt><dd>the shipping address zip</dd> | ||
<dt>shipCountry</dt><dd>the shipping address country</dd> | <dt>shipCountry</dt><dd>the shipping address country</dd> | ||
+ | <dt>shipPhone</dt><dd>the shipping recipient's phone numer</dd> | ||
+ | <dt>shipFax</dt><dd>the shipping recipient's fax number</dd> | ||
<dt>shipCompanyName</dt><dd>the shipping recipient's company name</dd> | <dt>shipCompanyName</dt><dd>the shipping recipient's company name</dd> | ||
<dt>email</dt><dd>the cardholder's email address</dd> | <dt>email</dt><dd>the cardholder's email address</dd> | ||
Line 93: | Line 165: | ||
<dt>track1</dt><dd>track1 data from a card reader<sup><a href="#track">*</a></sup>.</dd> | <dt>track1</dt><dd>track1 data from a card reader<sup><a href="#track">*</a></sup>.</dd> | ||
<dt>track2</dt><dd>track2 data from a card reader<sup><a href="#track">*</a></sup>.</dd> | <dt>track2</dt><dd>track2 data from a card reader<sup><a href="#track">*</a></sup>.</dd> | ||
− | <dt> | + | <dt>authCode</dt><dd>the authorization code returned by a call to CCLastPaymentAuthCode when using the Payments |
− | <dt> | + | Gateway gateway.</dd> |
− | + | <dt>profileDescription</dt><dd>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|CCProfileCreateCustomer]] or [[#CCProfileUpdateCustomer|CCProfileUpdateCustomer]].</dd> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</dl> | </dl> | ||
+ | |||
+ | <h4>PayPal Payflow Pro specific parameters: The following parameters are specific to the Payflow Pro gateway.</h4> | ||
+ | <dl> | ||
+ | <dt>user</dt><dd>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> | ||
+ | <dt>partner</dt><dd>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> | ||
+ | </dl> | ||
+ | |||
+ | <h4>Moneris eSELECTplus parameters: The following parameters are specific to the Moneris eSELECTplus gateway.</h4> | ||
+ | <em>Please note that <strong>orderId is required</strong> to successfully execute any payment-processing function | ||
+ | using the eSELECTplus gateway.</em> | ||
+ | <dl> | ||
+ | <dt>orderId</dt> | ||
+ | <dd>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> | ||
+ | <dt>province</dt><dd>The billing province</dd> | ||
+ | <dt>shipProvince</dt><dd>The shipping province</dd> | ||
+ | </dl> | ||
+ | |||
+ | <h4>First Data parameters: The following additional parameters are required to execute CCProcessPaymentACH using the | ||
+ | First Data Global Gateway.</h4> | ||
+ | |||
+ | <dl> | ||
+ | <dt>bankState</dt><dd>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> | ||
+ | <dt>driversLicenseNumber</dt><dd>The customer's driver's license number</dd> | ||
+ | <dt>driversLicenseState</dt><dd>The state that issued the customer's driver's license</dd> | ||
+ | </dl> | ||
+ | |||
+ | <h4 id="usaepay">USA ePay parameters: The following additional parameters are required to execute CCProcessPaymentACH using the USA ePay gateway.</h4> | ||
+ | <dl> | ||
+ | <dt>driversLicenseNumber</dt><dd>The customer's driver's license number</dd> | ||
+ | <dt>driversLicenseState</dt><dd>The state that issued the customer's driver's license</dd> | ||
+ | <dt>ssn</dt><dd>The customer's social security number</dd> | ||
+ | </dl> | ||
+ | |||
<h4>Void/Refund Parameters: These parameters are only used in the <code>CCVoidPayment</code> and <code>CCRefund</code> functions:</h4> | <h4>Void/Refund Parameters: These parameters are only used in the <code>CCVoidPayment</code> and <code>CCRefund</code> functions:</h4> | ||
<dl> | <dl> | ||
Line 109: | Line 213: | ||
<dt>expirationDate</dt><dd>The expiration date of the credit card number being voided, in MM/YY format (this is optional)</dd> | <dt>expirationDate</dt><dd>The expiration date of the credit card number being voided, in MM/YY format (this is optional)</dd> | ||
</dl> | </dl> | ||
− | < | + | |
+ | <h4 id="track">Magnetic swipe parameters (track1 and track2)</h4> | ||
+ | |||
+ | Certain types of merchant accounts (usually referred 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> | ||
+ | |||
+ | |||
+ | <em>Note: As a convenience, the Plastic function [[#CCTrackData|CCTrackData]] will parse either Track 1 or Track 2 data as a | ||
+ | return-separated string.</em> | ||
+ | </p> | ||
+ | |||
<h4 id="cardPresent">Card-present transactions</h4> | <h4 id="cardPresent">Card-present transactions</h4> | ||
Before attempting to perform a card-present transaction, make sure your gateway merchant account is configured | Before attempting to perform a card-present transaction, make sure your gateway merchant account is configured | ||
Line 149: | Line 292: | ||
"track2=;4912000033330026=15121011000012345678?" | "track2=;4912000033330026=15121011000012345678?" | ||
) | ) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<h4>Voiding previous transactions</h4> | <h4>Voiding previous transactions</h4> | ||
− | To void a transaction, you need the | + | To void a transaction, you need the transaction ID returned by <code>CCProcessPayment</code>. |
− | Pass this (along with other payment info) to the [[#CCVoidPayment|CCVoidPayment]] function. See the function documentation for an example of voiding a previous transaction. | + | Pass this (along with other payment info) to the [[#CCVoidPayment|CCVoidPayment]] function. See the function documentation for |
+ | an example of voiding a previous transaction. | ||
<h4>Crediting / Refunding previous transactions</h4> | <h4>Crediting / Refunding previous transactions</h4> | ||
− | To credit a transaction, you need the | + | To credit a transaction, you need the transaction ID returned by <code>CCProcessPayment</code>. |
− | Pass this (along with other payment info) to the [[#CCRefund|CCRefund]] function. This is similar to the void process, | + | Pass this (along with other payment info) to the [[#CCRefund|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( | CCRefund( | ||
Line 172: | Line 309: | ||
"1321353789" ; // the transactionID being credited | "1321353789" ; // the transactionID being credited | ||
"1234" ; // the last four digits of the credit card number | "1234" ; // the last four digits of the credit card number | ||
− | + | 2.99 ; // the amount of the refund | |
− | "expirationDate=" & Date(12, 1, 2010) ; // credit card expiration date | + | "expirationDate=" & Date(12, 1, 2010) ; // optional credit card expiration date |
− | "firstName=John" ; // card holder first name | + | "firstName=John" ; // optional card holder first name |
− | "lastName=Doe" ; // card holder last name | + | "lastName=Doe" ; // optional card holder last name |
) | ) | ||
+ | |||
+ | <h4>PayPal Website Payments Pro refunds</h4> | ||
+ | |||
+ | To credit a PayPal Website Payments Pro trnasaction, you need a transaction ID returned from a PayPal transaction. | ||
+ | Pass this and other info to the [[#CCRefund|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> | ||
Line 186: | Line 339: | ||
=Function Summary= | =Function Summary= | ||
<div id="toc"> | <div id="toc"> | ||
+ | *[[#CCCancelSubscription|CCCancelSubscription]] ( merchantAccountName; txKey; subscriptionId {; key1=value1; key2=value2; ...} ) — | ||
+ | *[[#CCCreateSubscription|CCCreateSubscription]] ( merchantAccountName; txKey; dollarAmount; cardNumber; expirationDate; subscriptionNameOrId; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) — | ||
+ | *[[#CCCreateSubscriptionACH|CCCreateSubscriptionACH]] ( merchantAccountName; txKey; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) — | ||
*[[#CCGetCardIssuer|CCGetCardIssuer]] ( cardNumber ) — Returns the card issuer for a given card number. | *[[#CCGetCardIssuer|CCGetCardIssuer]] ( cardNumber ) — Returns the card issuer for a given card number. | ||
+ | *[[#CCGetLast|CCGetLast]] ( name ) — This function returns a value from the most recent transaction response that corresponds to the <code>name</code> parameter. | ||
+ | *[[#CCLastAmountApproved|CCLastAmountApproved]] — | ||
+ | *[[#CCLastAmountRequested|CCLastAmountRequested]] — | ||
*[[#CCLastAVS|CCLastAVS]] — Returns the gateway's Address Verification System Response for the last payment which was processed with {@link #CCProcessPayment}. | *[[#CCLastAVS|CCLastAVS]] — Returns the gateway's Address Verification System Response for the last payment which was processed with {@link #CCProcessPayment}. | ||
+ | *[[#CCLastCCV|CCLastCCV]] — | ||
*[[#CCLastChargeResult|CCLastChargeResult]] — Returns the gateway's result code for the last operation. | *[[#CCLastChargeResult|CCLastChargeResult]] — Returns the gateway's result code for the last operation. | ||
− | *[[#CCLastError|CCLastError]] — Returns the text of the last | + | *[[#CCLastError|CCLastError]] — Returns the text of the last error triggered by a plugin function. |
*[[#CCLastPaymentAuthCode|CCLastPaymentAuthCode]] — Returns the gateway's approval code for the last payment which was processed with {@link #CCProcessPayment}. | *[[#CCLastPaymentAuthCode|CCLastPaymentAuthCode]] — Returns the gateway's approval code for the last payment which was processed with {@link #CCProcessPayment}. | ||
*[[#CCLastPaymentTransactionID|CCLastPaymentTransactionID]] — Returns the gateway's transaction ID for the last payment which was processed with {@link #CCProcessPayment}. | *[[#CCLastPaymentTransactionID|CCLastPaymentTransactionID]] — Returns the gateway's transaction ID for the last payment which was processed with {@link #CCProcessPayment}. | ||
*[[#CCLastRawResponse|CCLastRawResponse]] — This function returns the gateway's raw text response for the most recent transaction. | *[[#CCLastRawResponse|CCLastRawResponse]] — This function returns the gateway's raw text response for the most recent transaction. | ||
− | *[[#CCLicenseInfo|CCLicenseInfo]] — Returns information about the license used | + | *[[#CCLastRemainingBalance|CCLastRemainingBalance]] — |
+ | *[[#CCLastSplitTenderId|CCLastSplitTenderId]] — | ||
+ | *[[#CCLastSubscriptionID|CCLastSubscriptionID]] — | ||
+ | *[[#CCLicenseInfo|CCLicenseInfo]] — Returns information about the license used. | ||
+ | *[[#CCModifySubscription|CCModifySubscription]] ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; cardNumber; expirationDate; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) — | ||
+ | *[[#CCModifySubscriptionACH|CCModifySubscriptionACH]] ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) — | ||
*[[#CCParam|CCParam]] ( key ; value ) — | *[[#CCParam|CCParam]] ( key ; value ) — | ||
− | *[[#CCProcessAuthorizedPayment|CCProcessAuthorizedPayment]] ( merchantAccountName ; txKey ; previousTransactionID{; dollarAmount ; key1=value1; key2=value2; ...} ) — | + | *[[#CCPartialGetRemainingBalance|CCPartialGetRemainingBalance]] — This function returns the remaining balance for a partial authorization. |
− | *[[#CCProcessPayment|CCProcessPayment]] ( merchantAccountName ; txKey ; dollarAmount ; cardNumber ; expirationDate {; key1=value1; key2=value2; ...} ) — This is | + | *[[#CCPartialGetRequestedAmount|CCPartialGetRequestedAmount]] — This function returns the original amount requested for a partial authorization. |
− | *[[#CCRefund|CCRefund]] ( merchantAccountName ; txKey ; previousTransactionID ; | + | *[[#CCProcessAuthorizedPayment|CCProcessAuthorizedPayment]] ( merchantAccountName ; txKey ; previousTransactionID{; dollarAmount ; key1=value1; key2=value2; ...} ) — Processes an authorize-only transaction. |
− | *[[#CCRegister|CCRegister]] ( licenseKey ; registeredTo ) — Registers | + | *[[#CCProcessPayment|CCProcessPayment]] ( merchantAccountName ; txKey ; dollarAmount ; cardNumber ; expirationDate {; key1=value1; key2=value2; ...} ) — Processes credit-card payments. |
+ | *[[#CCProcessPaymentACH|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|CCProfileCreateCustomer]] ( merchantAccountName; txKey; customerId {; key1=value1; key2=value2; ...} ) — This function is used to create a customer profile using Authorize. | ||
+ | *[[#CCProfileCreatePayment|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|CCProfileCreatePaymentACH]] ( merchantAccountName; txKey; customerProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} ) — | ||
+ | *[[#CCProfileCreateShipping|CCProfileCreateShipping]] ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} ) — This function is used to create a shipping profile associated with a customer profile. | ||
+ | *[[#CCProfileDeleteCustomer|CCProfileDeleteCustomer]] ( merchantAccountName; txKey; customerProfileId ) — This function is used to delete a customer profile. | ||
+ | *[[#CCProfileDeletePayment|CCProfileDeletePayment]] ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} ) — This function is used to delete a payment profile associated with a customer profile. | ||
+ | *[[#CCProfileDeleteShipping|CCProfileDeleteShipping]] ( merchantAccountName; txKey; customerProfileId; shippingProfileId ) — This function is used to delete a shipping profile associated with a customer profile. | ||
+ | *[[#CCProfileGetCustomer|CCProfileGetCustomer]] ( merchantAccountName; txKey; customerProfileId ) — This function is used to retrieve an existing customer profile. | ||
+ | *[[#CCProfileGetPayment|CCProfileGetPayment]] ( merchantAccountName; txKey; customerProfileId; paymentProfileId ) — This function is used to retrieve an existing payment profile. | ||
+ | *[[#CCProfileGetShipping|CCProfileGetShipping]] ( merchantAccountName; txKey; customerProfileId; shippingProfileId ) — This function is used to retrieve an existing shipping profile. | ||
+ | *[[#CCProfileLastCustomerProfileID|CCProfileLastCustomerProfileID]] — | ||
+ | *[[#CCProfileLastPaymentProfileID|CCProfileLastPaymentProfileID]] — | ||
+ | *[[#CCProfileProcessAuthorizedPayment|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|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|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. | ||
+ | *[[#CCProfileUpdateCustomer|CCProfileUpdateCustomer]] ( merchantAccountName; txKey; customerId, customerProfileId {; key1=value1; key2=value2; ...} ) — This function is used to update a customer profile associated with a customer profile created | ||
+ | using Authorize. | ||
+ | *[[#CCProfileUpdatePayment|CCProfileUpdatePayment]] ( merchantAccountName; txKey; customerProfileId; paymentProfileId; cardNumber; expirationDate{; key1=value1; key2=value2; ...} ) — This function is used to update a payment profile associated with a customer profile created | ||
+ | using Authorize. | ||
+ | *[[#CCProfileUpdatePaymentACH|CCProfileUpdatePaymentACH]] ( merchantAccountName; txKey; customerProfileId; paymentProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} ) — | ||
+ | *[[#CCProfileUpdateShipping|CCProfileUpdateShipping]] ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} ) — This function is used to update a shipping profile associated with a customer profile. | ||
+ | *[[#CCProfileValidatePayment|CCProfileValidatePayment]] ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} ) — This function is used to validate a payment profile associated with a customer profile. | ||
+ | *[[#CCProfileVoidPayment|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|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. | ||
+ | *[[#CCRegister|CCRegister]] ( licenseKey ; registeredTo ) — Registers the CreditCardProcessor Plugin. | ||
+ | *[[#CCSetCertificate|CCSetCertificate]] ( certificate ; password ) — This function is used to set the security certificate for the First Data gateway. | ||
*[[#CCSetErrorCapture|CCSetErrorCapture]] ( errorCapture ) — | *[[#CCSetErrorCapture|CCSetErrorCapture]] ( errorCapture ) — | ||
− | *[[#CCSetGateway|CCSetGateway]] ( gatewayName { ; cardPresent= | + | *[[#CCSetGateway|CCSetGateway]] ( gatewayName {; cardPresent=false ; key1=value1; key2=value2; ...} ) — Switch which gateway to use (the default is authorize.net). |
*[[#CCSetTestMode|CCSetTestMode]] ( testModeSetting ) — Puts the credit card plugin into test mode. | *[[#CCSetTestMode|CCSetTestMode]] ( testModeSetting ) — Puts the credit card plugin into test mode. | ||
*[[#CCTrackData|CCTrackData]] ( trackData ) — Parses track1 or track2 data, returning extracted data as return-separated values. | *[[#CCTrackData|CCTrackData]] ( trackData ) — Parses track1 or track2 data, returning extracted data as return-separated values. | ||
Line 208: | Line 402: | ||
</div> | </div> | ||
=Function Detail= | =Function Detail= | ||
+ | <div id="CCCancelSubscription"></div> | ||
+ | ==CCCancelSubscription ( merchantAccountName; txKey; subscriptionId {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>subscriptionId</code> <dd> | ||
+ | <dt><code>paramStrings</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 | ||
+ | </div> | ||
+ | |||
+ | <div id="CCCreateSubscription"></div> | ||
+ | ==CCCreateSubscription ( merchantAccountName; txKey; dollarAmount; cardNumber; expirationDate; subscriptionNameOrId; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>dollarAmount</code> <dd> | ||
+ | <dt><code>cardNumber</code> <dd> | ||
+ | <dt><code>expirationDate</code> <dd> | ||
+ | <dt><code>subscriptionNameOrId</code> <dd> | ||
+ | <dt><code>numberOfInstallments</code> <dd> | ||
+ | <dt><code>startDate</code> <dd> | ||
+ | <dt><code>payPeriod</code> <dd> | ||
+ | <dt><code>frequency</code> <dd> | ||
+ | <dt><code>paramStrings</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 | ||
+ | </div> | ||
+ | |||
+ | <div id="CCCreateSubscriptionACH"></div> | ||
+ | ==CCCreateSubscriptionACH ( merchantAccountName; txKey; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>dollarAmount</code> <dd> | ||
+ | <dt><code>accountNumber</code> <dd> | ||
+ | <dt><code>routingNumber</code> <dd> | ||
+ | <dt><code>bankName</code> <dd> | ||
+ | <dt><code>accountType</code> <dd> | ||
+ | <dt><code>accountHolderFirstName</code> <dd> | ||
+ | <dt><code>accountHolderLastName</code> <dd> | ||
+ | <dt><code>subscriptionName</code> <dd> | ||
+ | <dt><code>numberOfInstallments</code> <dd> | ||
+ | <dt><code>startDate</code> <dd> | ||
+ | <dt><code>endDate</code> <dd> | ||
+ | <dt><code>payPeriod</code> <dd> | ||
+ | <dt><code>frequency</code> <dd> | ||
+ | <dt><code>paramStrings</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 | ||
+ | </div> | ||
+ | |||
<div id="CCGetCardIssuer"></div> | <div id="CCGetCardIssuer"></div> | ||
==CCGetCardIssuer ( cardNumber ) == | ==CCGetCardIssuer ( cardNumber ) == | ||
Line 225: | Line 477: | ||
<div class="see"><strong>Returns:</strong> One of the following: VISA, MASTERCARD, AMEX, DINERS, DISCOVER, JCB. Returns an error if the card number is from another issuer. | <div class="see"><strong>Returns:</strong> One of the following: VISA, MASTERCARD, AMEX, DINERS, DISCOVER, JCB. Returns an error if the card number is from another issuer. | ||
</div> | </div> | ||
+ | |||
+ | <div id="CCGetLast"></div> | ||
+ | ==CCGetLast ( name ) == | ||
+ | This function returns a value from the most recent transaction response that corresponds to the <code>name</code> parameter. | ||
+ | |||
+ | Name parameters should be passed as they are listed in the developer documentation for a specific gateway. The | ||
+ | following gateways are supported: | ||
+ | |||
+ | <ul> | ||
+ | <li>PayPal Website Payments Pro</li> | ||
+ | <li>InternetSecure</li> | ||
+ | </ul> | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl></dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> The value corresponding to a given name | ||
+ | </div> | ||
+ | |||
+ | <div id="CCLastAmountApproved"></div> | ||
+ | ==CCLastAmountApproved== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div id="CCLastAmountRequested"></div> | ||
+ | ==CCLastAmountRequested== | ||
+ | |||
+ | |||
+ | |||
<div id="CCLastAVS"></div> | <div id="CCLastAVS"></div> | ||
Line 232: | Line 513: | ||
<blockquote>You must process a payment with the CCProcessPayment function before calling this function</blockquote> | <blockquote>You must process a payment with the CCProcessPayment function before calling this function</blockquote> | ||
− | + | <h4>Authorize.net</h4> | |
A = Address (Street) matches, ZIP does not <br/> B = Address information not provided for AVS check <br/> E = | A = Address (Street) matches, ZIP does not <br/> B = Address information not provided for AVS check <br/> E = | ||
AVS error <br/> G = Non-U.S. Card Issuing Bank <br/> N = No Match on Address (Street) or ZIP <br/> P = AVS | AVS error <br/> G = Non-U.S. Card Issuing Bank <br/> N = No Match on Address (Street) or ZIP <br/> P = AVS | ||
Line 240: | Line 521: | ||
match <br/> Z = 5 digit ZIP matches, Address (Street) does not <br/> | match <br/> Z = 5 digit ZIP matches, Address (Street) does not <br/> | ||
− | Note: This feature is currently only implemented for the Authorize.net | + | |
+ | <h4>USA ePay</h4> | ||
+ | <table style="text-align:left;" class="inline"> | ||
+ | <tr class="row0"> | ||
+ | <th class="col0 leftalign">Code </th><th class="col1 leftalign">Alternates </th><th class="col2 leftalign">Meaning </th> | ||
+ | </tr> | ||
+ | <tr class="row1"> | ||
+ | <td class="col0 leftalign"> YYY </td><td class="col1 leftalign"> Y, YYA, YYD </td><td class="col2"> Address: Match & 5 Digit Zip: Match </td> | ||
+ | </tr> | ||
+ | <tr class="row2"> | ||
+ | <td class="col0 leftalign"> NYZ </td><td class="col1 leftalign"> Z </td><td class="col2"> Address: No Match & 5 Digit Zip: Match </td> | ||
+ | </tr> | ||
+ | <tr class="row3"> | ||
+ | <td class="col0 leftalign"> YNA </td><td class="col1 leftalign"> A, YNY </td><td class="col2"> Address: Match & 5 Digit Zip: No Match </td> | ||
+ | </tr> | ||
+ | <tr class="row4"> | ||
+ | <td class="col0 leftalign"> NNN </td><td class="col1 leftalign"> N, NN </td><td class="col2"> Address: No Match & 5 Digit Zip: No Match </td> | ||
+ | </tr> | ||
+ | <tr class="row5"> | ||
+ | <td class="col0 leftalign"> YYX </td><td class="col1 leftalign"> X </td><td class="col2"> Address: Match & 9 Digit Zip: Match </td> | ||
+ | </tr> | ||
+ | <tr class="row6"> | ||
+ | <td class="col0 leftalign"> NYW </td><td class="col1 leftalign"> W </td><td class="col2"> Address: No Match & 9 Digit Zip: Match </td> | ||
+ | </tr> | ||
+ | <tr class="row7"> | ||
+ | <td class="col0 leftalign"> XXW </td><td class="col1 rightalign"> </td><td class="col2"> Card Number Not On File </td> | ||
+ | </tr> | ||
+ | <tr class="row8"> | ||
+ | <td class="col0 leftalign"> XXU </td><td class="col1 rightalign"> </td><td class="col2"> Address Information not verified for domestic transaction </td> | ||
+ | </tr> | ||
+ | <tr class="row9"> | ||
+ | <td class="col0 leftalign"> XXR </td><td class="col1 leftalign"> R, U, E </td><td class="col2"> Retry / System Unavailable </td> | ||
+ | </tr> | ||
+ | <tr class="row10"> | ||
+ | <td class="col0 leftalign"> XXS </td><td class="col1 leftalign"> S </td><td class="col2"> Service Not Supported </td> | ||
+ | </tr> | ||
+ | <tr class="row11"> | ||
+ | <td class="col0 leftalign"> XXE </td><td class="col1 rightalign"> </td><td class="col2"> Address Verification Not Allowed For Card Type </td> | ||
+ | </tr> | ||
+ | <tr class="row12"> | ||
+ | <td class="col0 leftalign"> XXG </td><td class="col1 leftalign"> G,C,I </td><td class="col2"> Global Non-<acronym title="Address Verification System">AVS</acronym> participant </td> | ||
+ | </tr> | ||
+ | <tr class="row13"> | ||
+ | <td class="col0 leftalign"> YYG </td><td class="col1 leftalign"> B, M </td><td class="col2"> International Address: Match & Zip: Not Compatible </td> | ||
+ | </tr> | ||
+ | <tr class="row14"> | ||
+ | <td class="col0 leftalign"> GGG </td><td class="col1 leftalign"> D </td><td class="col2"> International Address: Match & Zip: Match </td> | ||
+ | </tr> | ||
+ | <tr class="row15"> | ||
+ | <td class="col0 leftalign"> YGG </td><td class="col1 leftalign"> P </td><td class="col2"> International Address: No Compatible & Zip: Match </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | Note: This feature is currently only implemented for the Authorize.net and USA ePay gateways. | ||
+ | |||
+ | |||
+ | |||
+ | <div id="CCLastCCV"></div> | ||
+ | ==CCLastCCV== | ||
+ | |||
Line 246: | Line 586: | ||
<div id="CCLastChargeResult"></div> | <div id="CCLastChargeResult"></div> | ||
==CCLastChargeResult== | ==CCLastChargeResult== | ||
− | Returns the gateway's result code for the last operation. This | + | Returns the gateway's result code for the last operation. |
− | For | + | This code usually indicates the approval, denial or failure of a transaction. |
+ | |||
+ | For Authorize.net, the codes are: | ||
+ | |||
<ol> | <ol> | ||
<li>Approved</li> | <li>Approved</li> | ||
Line 254: | Line 597: | ||
</ol> | </ol> | ||
− | For Payflow Pro, a '0' indicates success; a negative value indicates a failure. | + | For Payflow Pro / Verisign, a '0' indicates success; a negative value indicates a failure. |
Line 260: | Line 603: | ||
<div id="CCLastError"></div> | <div id="CCLastError"></div> | ||
==CCLastError== | ==CCLastError== | ||
− | Returns the text of the last | + | Returns the text of the last error triggered by a plugin function. |
− | This should be called | + | This should be called immediately after a plugin function returns "ERROR" to get a description of the error. |
<div class="see"><strong>Returns:</strong> Error text, or <code>""</code> if there was no error. | <div class="see"><strong>Returns:</strong> Error text, or <code>""</code> if there was no error. | ||
Line 269: | Line 612: | ||
==CCLastPaymentAuthCode== | ==CCLastPaymentAuthCode== | ||
Returns the gateway's approval code for the last payment which was processed with [[#CCProcessPayment|CCProcessPayment]]. | Returns the gateway's approval code for the last payment which was processed with [[#CCProcessPayment|CCProcessPayment]]. | ||
− | You must process a payment before calling this function. | + | 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 [[#CCLastPaymentTransactionID|CCLastPaymentTransactionID]]. | ||
− | <div class="see"><strong>Returns:</strong> | + | <div class="see"><strong>Returns:</strong> a transaction ID |
</div> | </div> | ||
Line 294: | Line 638: | ||
<div class="see"><strong>Returns:</strong> The gateway's raw text response for the most recent transaction. | <div class="see"><strong>Returns:</strong> The gateway's raw text response for the most recent transaction. | ||
</div> | </div> | ||
+ | |||
+ | <div id="CCLastRemainingBalance"></div> | ||
+ | ==CCLastRemainingBalance== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div id="CCLastSplitTenderId"></div> | ||
+ | ==CCLastSplitTenderId== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div id="CCLastSubscriptionID"></div> | ||
+ | ==CCLastSubscriptionID== | ||
+ | |||
+ | |||
+ | |||
<div id="CCLicenseInfo"></div> | <div id="CCLicenseInfo"></div> | ||
==CCLicenseInfo== | ==CCLicenseInfo== | ||
− | Returns information about the license used | + | Returns information about the license used. |
− | <div class="see"><strong>Returns:</strong> | + | <div class="see"><strong>Returns:</strong> The type of license the plugin is registered under. |
+ | </div> | ||
+ | |||
+ | <div id="CCModifySubscription"></div> | ||
+ | ==CCModifySubscription ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; cardNumber; expirationDate; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>previousSubscriptionId</code> <dd> | ||
+ | <dt><code>dollarAmount</code> <dd> | ||
+ | <dt><code>cardNumber</code> <dd> | ||
+ | <dt><code>expirationDate</code> <dd> | ||
+ | <dt><code>subscriptionName</code> <dd> | ||
+ | <dt><code>numberOfInstallments</code> <dd> | ||
+ | <dt><code>startDate</code> <dd> | ||
+ | <dt><code>endDate</code> <dd> | ||
+ | <dt><code>payPeriod</code> <dd> | ||
+ | <dt><code>frequency</code> <dd> | ||
+ | <dt><code>paramStrings</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 | ||
+ | </div> | ||
+ | |||
+ | <div id="CCModifySubscriptionACH"></div> | ||
+ | ==CCModifySubscriptionACH ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>previousSubscriptionId</code> <dd> | ||
+ | <dt><code>dollarAmount</code> <dd> | ||
+ | <dt><code>accountNumber</code> <dd> | ||
+ | <dt><code>routingNumber</code> <dd> | ||
+ | <dt><code>bankName</code> <dd> | ||
+ | <dt><code>accountType</code> <dd> | ||
+ | <dt><code>accountHolderFirstName</code> <dd> | ||
+ | <dt><code>accountHolderLastName</code> <dd> | ||
+ | <dt><code>subscriptionName</code> <dd> | ||
+ | <dt><code>numberOfInstallments</code> <dd> | ||
+ | <dt><code>startDate</code> <dd> | ||
+ | <dt><code>endDate</code> <dd> | ||
+ | <dt><code>payPeriod</code> <dd> | ||
+ | <dt><code>frequency</code> <dd> | ||
+ | <dt><code>subscriberFirstName</code> <dd> | ||
+ | <dt><code>subscriberLastName</code> <dd> | ||
+ | <dt><code>paramStrings</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 | ||
</div> | </div> | ||
Line 309: | Line 721: | ||
<dl></dl></div> | <dl></dl></div> | ||
+ | |||
+ | <div id="CCPartialGetRemainingBalance"></div> | ||
+ | ==CCPartialGetRemainingBalance== | ||
+ | This function returns the remaining balance for a partial authorization. | ||
+ | |||
+ | <div class="see"><strong>Returns:</strong> A dollar amount | ||
+ | </div> | ||
+ | |||
+ | <div id="CCPartialGetRequestedAmount"></div> | ||
+ | ==CCPartialGetRequestedAmount== | ||
+ | This function returns the original amount requested for a partial authorization. | ||
+ | |||
+ | <div class="see"><strong>Returns:</strong> A dollar amount | ||
+ | </div> | ||
<div id="CCProcessAuthorizedPayment"></div> | <div id="CCProcessAuthorizedPayment"></div> | ||
==CCProcessAuthorizedPayment ( merchantAccountName ; txKey ; previousTransactionID{; dollarAmount ; key1=value1; key2=value2; ...} ) == | ==CCProcessAuthorizedPayment ( merchantAccountName ; txKey ; previousTransactionID{; dollarAmount ; key1=value1; key2=value2; ...} ) == | ||
− | + | Processes an authorize-only transaction. | |
− | + | ||
− | The second parameter (<code>txKey</code>) should be your 16-digit | + | See the documentation for the [[#CCProcessPayment|CCProcessPayment]] function for instructions on how to submit an authorize-only transaction. |
− | You can obtain an | + | |
+ | |||
+ | The second parameter (<code>txKey</code>) should be your merchant account password <strong>OR</strong> your 16-digit authorize.net transaction key. | ||
+ | You can obtain an authorize.net transactionKey by logging into [https://account.authorize.net/ https://account.authorize.net/] and going | ||
to the Account / Settings / Transaction key section. | 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 | 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 | ||
Line 325: | Line 755: | ||
of the transaction identified by the third parameter (<code>previousTransactionID</code>). | of the transaction identified by the third parameter (<code>previousTransactionID</code>). | ||
− | To pass in additional parameters, see the documentation and examples at the top of this document. | + | To pass in additional parameters, see the [[#optional|documentation and examples]] at the top of this document. |
If successful, this function returns the unique <code>transactionID</code> for the payment (as assigned by the payment gateway). | If successful, this function returns the unique <code>transactionID</code> for the payment (as assigned by the payment gateway). | ||
If you wish to void the payment later with the [[#CCVoidPayment|CCVoidPayment]] function, you will need this number! | If you wish to void the payment later with the [[#CCVoidPayment|CCVoidPayment]] function, you will need this number! | ||
− | Note: if test mode is enabled, a successful | + | Note: if test mode is enabled, a successful authorize.net transaction will return <code>123456789</code>. |
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> | ||
<dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
− | <dt><code>txKey</code> <dd>your | + | <dt><code>txKey</code> <dd>your merchant account password OR authorize.net transaction key |
<dt><code>previousTransactionID</code> <dd>the id of the previously authorized transaction to be processed | <dt><code>previousTransactionID</code> <dd>the id of the previously authorized transaction to be processed | ||
<dt><code>dollarAmount</code> <dd>the amount of the transaction | <dt><code>dollarAmount</code> <dd>the amount of the transaction | ||
</dl></div> | </dl></div> | ||
− | <div class="see"><strong>Returns:</strong> a verification code | + | <div class="see"><strong>Returns:</strong> a verification code 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) |
− | + | ||
</div> | </div> | ||
<div id="CCProcessPayment"></div> | <div id="CCProcessPayment"></div> | ||
==CCProcessPayment ( merchantAccountName ; txKey ; dollarAmount ; cardNumber ; expirationDate {; key1=value1; key2=value2; ...} ) == | ==CCProcessPayment ( merchantAccountName ; txKey ; dollarAmount ; cardNumber ; expirationDate {; key1=value1; key2=value2; ...} ) == | ||
− | + | Processes credit-card payments. | |
− | + | The second parameter (<code>txKey</code>) should be your merchant account password <strong>OR</strong> your 16-digit authorize.net transaction key. | |
− | The second parameter (<code>txKey</code>) should be your 16-digit | + | You can obtain an authorize.net transactionKey by logging into [https://account.authorize.net/ https://account.authorize.net/] and going |
− | You can obtain an | + | |
to the Account / Settings / Transaction key section. | 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 | 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. | parameter to this function. | ||
Line 356: | Line 785: | ||
and set its value to <code>AUTH_ONLY</code> using the following format: 'authMode=AUTH_ONLY'. | and set its value to <code>AUTH_ONLY</code> using the following format: 'authMode=AUTH_ONLY'. | ||
− | To pass in additional parameters, see the documentation and examples at the top of this document. | + | To pass in additional parameters, see the [[#optional|documentation and examples]] at the top of this document. |
If successful, this function returns the unique <code>transactionID</code> for the transaction (as assigned by the payment gateway). | If successful, this function returns the unique <code>transactionID</code> for the transaction (as assigned by the payment gateway). | ||
Line 362: | Line 791: | ||
[[#CCProcessAuthorizedPayment|CCProcessAuthorizedPayment]] function, you will need this number! | [[#CCProcessAuthorizedPayment|CCProcessAuthorizedPayment]] function, you will need this number! | ||
− | Note: if test mode is enabled, a successful Authorize.net transaction will return <code>123456789</code>. | + | <em>Note: if test mode is enabled, a successful Authorize.net transaction will return <code>123456789</code>.</em> |
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> | ||
<dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
− | <dt><code>txKey</code> <dd>your | + | <dt><code>txKey</code> <dd>your merchant account password OR authorize.net transaction key |
<dt><code>dollarAmount</code> <dd>the amount of the transaction | <dt><code>dollarAmount</code> <dd>the amount of the transaction | ||
<dt><code>cardNumber</code> <dd>the credit card account number to charge for the transaction | <dt><code>cardNumber</code> <dd>the credit card account number to charge for the transaction | ||
<dt><code>expirationDate</code> <dd>the expiration date of the credit card being charged. Format the expiration date as MMYY or MM/YY or MM/DD/YY | <dt><code>expirationDate</code> <dd>the expiration date of the credit card being charged. Format the expiration date as MMYY or MM/YY or MM/DD/YY | ||
</dl></div> | </dl></div> | ||
− | <div class="see"><strong>Returns:</strong> a verification code from the payment gateway service if the order is successful, or "ERROR" if there was a problem (use CCLastError for more | + | <div class="see"><strong>Returns:</strong> a verification code 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) |
− | + | ||
</div> | </div> | ||
− | <div id=" | + | <div id="CCProcessPaymentACH"></div> |
− | == | + | ==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 <code>CCProcessPayment</code> 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. [[#usaepay|Click here]] for more information. | ||
− | + | The <code>accountType</code> parameter has three possible values: "checking," "savings," and "business_checking." | |
− | + | ||
− | + | ||
− | + | If successful, this function returns the unique <code>transactionID</code> for the transaction (as assigned by the payment gateway). | |
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> | ||
<dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
− | <dt><code>txKey</code> <dd>your | + | <dt><code>txKey</code> <dd>your merchant account password OR authorize.net transaction key |
+ | <dt><code>dollarAmount</code> <dd>the amount of the transaction | ||
+ | <dt><code>accountNumber</code> <dd>the account number to debit for the transaction | ||
+ | <dt><code>routingNumber</code> <dd>the routing number for the account to debit for the transaction | ||
+ | <dt><code>bankName</code> <dd>the name of the bank | ||
+ | <dt><code>accountType</code> <dd>the type of account ("checking," "savings," or "business_checking") | ||
+ | <dt><code>accountHolderFirstName</code> <dd>the first name of the account holder | ||
+ | <dt><code>accountHolderLastName</code> <dd>the last name of the account holder | ||
+ | <dt><code>checkNumber</code> <dd>the number of the check (used for back-office transactions) | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> a verification code 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) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileCreateCustomer"></div> | ||
+ | ==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. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your merchant account password or authorize.net transaction key | ||
+ | <dt><code>customerId</code> <dd>merchant-assigned ID for the customer | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> the customer profile ID used to reference the newly created profile if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileCreatePayment"></div> | ||
+ | ==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. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID, like the one | ||
+ | returned by a successful call to CCProfileCreateCustomer | ||
+ | <dt><code>cardNumber</code> <dd>the credit card number to use for this payment profile | ||
+ | <dt><code>expirationDate</code> <dd>the expiration date for the credit card to use for this payment profile | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> the payment profile ID used to reference the newly created profile if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileCreatePaymentACH"></div> | ||
+ | ==CCProfileCreatePaymentACH ( merchantAccountName; txKey; customerProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>customerProfileId</code> <dd> | ||
+ | <dt><code>accountNumber</code> <dd> | ||
+ | <dt><code>abaRoutingNumber</code> <dd> | ||
+ | <dt><code>bankName</code> <dd> | ||
+ | <dt><code>accountType</code> <dd> | ||
+ | <dt><code>accountHolderFirstName</code> <dd> | ||
+ | <dt><code>accountHolderLastName</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileCreateShipping"></div> | ||
+ | ==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 [[#optional|documentation and examples]] at the top of this document. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID, like the one returned by a successful call to CCProfileCreateCustomer | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> the shipping profile ID used to reference the newly created profile if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileDeleteCustomer"></div> | ||
+ | ==CCProfileDeleteCustomer ( merchantAccountName; txKey; customerProfileId ) == | ||
+ | This function is used to delete a customer profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileDeletePayment"></div> | ||
+ | ==CCProfileDeletePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} ) == | ||
+ | This function is used to delete a payment profile associated with a customer profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileDeleteShipping"></div> | ||
+ | ==CCProfileDeleteShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId ) == | ||
+ | This function is used to delete a shipping profile associated with a customer profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>shippingProfileId</code> <dd>a shipping profile ID associated with the customerProfileId | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileGetCustomer"></div> | ||
+ | ==CCProfileGetCustomer ( merchantAccountName; txKey; customerProfileId ) == | ||
+ | This function is used to retrieve an existing customer profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>customerProfileId</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileGetPayment"></div> | ||
+ | ==CCProfileGetPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId ) == | ||
+ | This function is used to retrieve an existing payment profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>customerProfileId</code> <dd> | ||
+ | <dt><code>paymentProfileId</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> A string representation of the payment profile | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileGetShipping"></div> | ||
+ | ==CCProfileGetShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId ) == | ||
+ | This function is used to retrieve an existing shipping profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>customerProfileId</code> <dd> | ||
+ | <dt><code>shippingProfileId</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> A string representation of the shipping profile | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileLastCustomerProfileID"></div> | ||
+ | ==CCProfileLastCustomerProfileID== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div id="CCProfileLastPaymentProfileID"></div> | ||
+ | ==CCProfileLastPaymentProfileID== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div id="CCProfileProcessAuthorizedPayment"></div> | ||
+ | ==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. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | <dt><code>previousTransactionId</code> <dd>the id of the previously authorized transaction to process | ||
+ | <dt><code>dollarAmount</code> <dd>the amount of the transaction | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> a transaction id from the payment gateway service if the transaction is successful, or "ERROR" if there was | ||
+ | a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileProcessPayment"></div> | ||
+ | ==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 [[#CCProfileCreateCustomer|CCProfileCreateCustomer]]. | ||
+ | |||
+ | To perform an authorize-only transaction without submitting it for settlement, you must pass in an additional | ||
+ | parameter named <code>authMode</code> and set its value to <code>AUTH_ONLY</code> using the following format: 'authMode=AUTH_ONLY'. | ||
+ | |||
+ | To pass in additional parameters, see the [[#optional|documentation and examples]] at the top of this document. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | <dt><code>dollarAmount</code> <dd>the amount of the transaction | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> a transaction id from the payment gateway service if the transaction is successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileRefund"></div> | ||
+ | ==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. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | <dt><code>previousTransactionId</code> <dd>the id of the transaction to be refunded | ||
+ | <dt><code>amountToCredit</code> <dd>the refund dollar amount, which must not exceed the full amount of the original transaction | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> a transaction id from the payment gateway service if the transaction is successful, or "ERROR" if there was | ||
+ | a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileUpdateCustomer"></div> | ||
+ | ==CCProfileUpdateCustomer ( merchantAccountName; txKey; customerId, customerProfileId {; key1=value1; key2=value2; ...} ) == | ||
+ | This function is used to update a customer profile associated with a customer profile created | ||
+ | using Authorize.net's Customer Information Manager system. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileUpdatePayment"></div> | ||
+ | ==CCProfileUpdatePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; cardNumber; expirationDate{; key1=value1; key2=value2; ...} ) == | ||
+ | This function is used to update a payment profile associated with a customer profile created | ||
+ | using Authorize.net's Customer Information Manager system. The credit card information used to update this | ||
+ | profile will replace the credit card information currently stored in the profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | <dt><code>cardNumber</code> <dd>the credit card number | ||
+ | <dt><code>expirationDate</code> <dd>the credit card expiration date | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileUpdatePaymentACH"></div> | ||
+ | ==CCProfileUpdatePaymentACH ( merchantAccountName; txKey; customerProfileId; paymentProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} ) == | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd> | ||
+ | <dt><code>txKey</code> <dd> | ||
+ | <dt><code>customerProfileId</code> <dd> | ||
+ | <dt><code>accountNumber</code> <dd> | ||
+ | <dt><code>abaRoutingNumber</code> <dd> | ||
+ | <dt><code>bankName</code> <dd> | ||
+ | <dt><code>accountType</code> <dd> | ||
+ | <dt><code>accountHolderFirstName</code> <dd> | ||
+ | <dt><code>accountHolderLastName</code> <dd> | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileUpdateShipping"></div> | ||
+ | ==CCProfileUpdateShipping ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} ) == | ||
+ | This function is used to update 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 [[#optional|documentation and examples]] at the top of this document. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID, like the one returned by a successful call to CCProfileCreateCustomer | ||
+ | <dt><code>shippingProfileId</code> <dd>a Customer Information Manager system shipping profile ID, like the one returned by a successful call to CCProfileCreateCustomer | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> the shipping profile ID used to reference the newly created profile if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileValidatePayment"></div> | ||
+ | ==CCProfileValidatePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} ) == | ||
+ | This function is used to validate a payment profile associated with a customer profile. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if successful, or "ERROR" if there was a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCProfileVoidPayment"></div> | ||
+ | ==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. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>customerProfileId</code> <dd>a Customer Information Manager system customer profile ID | ||
+ | <dt><code>paymentProfileId</code> <dd>a payment profile ID associated with the customerProfileId | ||
+ | <dt><code>previousTransactionId</code> <dd>the id of the transaction to be voided | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> a transaction id from the payment gateway service if the transaction is successful, or "ERROR" if there was | ||
+ | a problem (use CCLastError for more detailed information about the nature of the error) | ||
+ | </div> | ||
+ | |||
+ | <div id="CCRefund"></div> | ||
+ | ==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: | ||
+ | <ul><li> The transaction is submitted with the ID of the original transaction against | ||
+ | which the credit is being issued (x_trans_id). </li> | ||
+ | <li> The gateway has a record of the original transaction.</li> | ||
+ | <li> 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.</li> | ||
+ | <li> 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. | ||
+ | </li><li> 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.</li> | ||
+ | <li> The transaction is | ||
+ | submitted within 120 days of the settlement date and time of the original transaction. </li></ul> | ||
+ | |||
+ | |||
+ | To pass in additional parameters, see the [[#optional|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 the form of additional | ||
+ | parameters: | ||
+ | <ul> | ||
+ | <li>credit card expiration date</li> | ||
+ | <li>cardholder first name</li> | ||
+ | <li>cardholder last name</li> | ||
+ | </ul> | ||
+ | |||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
+ | <dt><code>txKey</code> <dd>your merchant account password OR authorize.net transaction key. | ||
<dt><code>previousTransactionID</code> <dd>the transactionId of a previously processed transaction. | <dt><code>previousTransactionID</code> <dd>the transactionId of a previously processed transaction. | ||
− | <dt><code> | + | <dt><code>accountNumber</code> <dd>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. |
− | <dt><code>amountToCredit</code> <dd>the amount to credit, as a positive number. Must be less than | + | <dt><code>amountToCredit</code> <dd>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. |
</dl></div> | </dl></div> | ||
− | <div class="see"><strong>Returns:</strong> 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) | + | <div class="see"><strong>Returns:</strong> 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) |
</div> | </div> | ||
<div id="CCRegister"></div> | <div id="CCRegister"></div> | ||
==CCRegister ( licenseKey ; registeredTo ) == | ==CCRegister ( licenseKey ; registeredTo ) == | ||
− | Registers | + | Registers the CreditCardProcessor Plugin. |
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> | ||
− | <dl><dt><code>licenseKey</code> <dd>a valid license key string | + | <dl><dt><code>licenseKey</code> <dd>a valid license key string, or the literal string "DEMO" to run in demo mode. |
− | <dt><code>registeredTo</code> <dd>the name for the license key used | + | <dt><code>registeredTo</code> <dd>the company name for the license key used. |
</dl></div> | </dl></div> | ||
− | <div class="see"><strong>Returns:</strong> 1 on success, "ERROR" on failure | + | <div class="see"><strong>Returns:</strong> 1 on success, or "ERROR" on failure. |
+ | </div> | ||
+ | |||
+ | <div id="CCSetCertificate"></div> | ||
+ | ==CCSetCertificate ( certificate ; password ) == | ||
+ | This function is used to set the security certificate for the First Data gateway. | ||
+ | Users with First Data merchant accounts must access their account online and download a security certificate. | ||
+ | In order to access the First Data gateway with Plastic, you must insert this file into a container field and | ||
+ | call this function. Make sure you have set the gateway to First Data using CCSetGateway before calling this function. | ||
+ | |||
+ | Note: You should only have to call this function once per session. | ||
+ | |||
+ | <div class="parameters"><strong>Parameters:</strong> | ||
+ | <dl><dt><code>data</code> <dd>A container field containing the security certificate | ||
+ | </dl></div> | ||
+ | <div class="see"><strong>Returns:</strong> 1 if a valid certificate is provided, ERROR otherwise. | ||
</div> | </div> | ||
Line 417: | Line 1,200: | ||
<div id="CCSetGateway"></div> | <div id="CCSetGateway"></div> | ||
− | ==CCSetGateway ( gatewayName { ; cardPresent= | + | ==CCSetGateway ( gatewayName {; cardPresent=false ; key1=value1; key2=value2; ...} ) == |
Switch which gateway to use (the default is authorize.net). | Switch which gateway to use (the default is authorize.net). | ||
The following gateways are supported: | The following gateways are supported: | ||
− | <ul><li> | + | <ul> |
+ | <li>Payflow Pro</li> | ||
<li>Authorize.net</li> | <li>Authorize.net</li> | ||
+ | <li>eSELECTplus</li> | ||
+ | <li>First Data</li> | ||
+ | <li>GIACT</li> | ||
+ | <li>InternetSecure</li> | ||
</ul> | </ul> | ||
This plugin function takes additional arguments. Currently the only optional argument is whether submitted transactions are to be processed as SWIPE (card-present) transactions. | This plugin function takes additional arguments. Currently the only optional argument is whether submitted transactions are to be processed as SWIPE (card-present) transactions. | ||
Line 435: | Line 1,223: | ||
<dl><dt><code>gatewayName</code> <dd>one of the supported gateway names. | <dl><dt><code>gatewayName</code> <dd>one of the supported gateway names. | ||
</dl></div> | </dl></div> | ||
− | <div class="see"><strong>Returns:</strong> 1 if a valid gateway is | + | <div class="see"><strong>Returns:</strong> 1 if a valid gateway is provided, ERROR otherwise. |
</div> | </div> | ||
<div id="CCSetTestMode"></div> | <div id="CCSetTestMode"></div> | ||
==CCSetTestMode ( testModeSetting ) == | ==CCSetTestMode ( testModeSetting ) == | ||
− | Puts the credit card plugin into test mode. Pass in a 1 for test mode or 0 for | + | Puts the credit card plugin into test mode. Pass in a 1 for test mode or 0 for live mode. |
When in test mode, all credit card charges will be sent to a special test server that runs | When in test mode, all credit card charges will be sent to a special test server that runs | ||
the normal verification process, but does not run real charges. | the normal verification process, but does not run real charges. | ||
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> | ||
− | <dl><dt><code>testModeSetting</code> <dd>1 or 0 | + | <dl><dt><code>testModeSetting</code> <dd>a 1 for test mode or a 0 for live mode |
</dl></div> | </dl></div> | ||
− | <div class="see"><strong>Returns:</strong> 1 on success, | + | <div class="see"><strong>Returns:</strong> 1 on success, "ERROR" on failure. |
</div> | </div> | ||
Line 495: | Line 1,283: | ||
Returns the version of the credit card plugin which is installed. | Returns the version of the credit card plugin which is installed. | ||
− | <div class="see"><strong>Returns:</strong> | + | <div class="see"><strong>Returns:</strong> a decimal version number. |
</div> | </div> | ||
Line 507: | Line 1,295: | ||
− | To pass in additional parameters, see the documentation and examples at the top of this document. | + | To pass in additional parameters, see the [[#optional|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 | ||
+ | <code>authCode</code>. This refers to the original authorization code returned by the Payments Gateway gateway, | ||
+ | which can be retrieved via a call to the [[#CCLastPaymentAuthCode|CCLastPaymentAuthCode]] function. | ||
Here is an example of voiding a previous transaction whose transaction ID is 123: | Here is an example of voiding a previous transaction whose transaction ID is 123: | ||
Line 524: | Line 1,315: | ||
<div class="parameters"><strong>Parameters:</strong> | <div class="parameters"><strong>Parameters:</strong> | ||
<dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | <dl><dt><code>merchantAccountName</code> <dd>your payment gateway merchant account name | ||
− | <dt><code>txKey</code> <dd>your | + | <dt><code>txKey</code> <dd>your merchant account password OR authorize.net transaction key. |
<dt><code>previousTransactionID</code> <dd>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. | <dt><code>previousTransactionID</code> <dd>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. | ||
</dl></div> | </dl></div> | ||
<div class="see"><strong>See also:</strong> [[#CCLastPaymentTransactionID|CCLastPaymentTransactionID]] | <div class="see"><strong>See also:</strong> [[#CCLastPaymentTransactionID|CCLastPaymentTransactionID]] | ||
− | </div><div class="see"><strong>Returns:</strong> the transactionID from the payment gateway service if the order is successful, or "ERROR" if there was a problem (use CCLastError for more detailed | + | </div><div class="see"><strong>Returns:</strong> 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) |
− | + | ||
</div> | </div> |
Revision as of 21:14, 15 December 2014
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 (usually referred 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, 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.</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 by CCProcessPayment
.
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 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.
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 a transaction 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
- CCCancelSubscription ( merchantAccountName; txKey; subscriptionId {; key1=value1; key2=value2; ...} ) —
- 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.
- CCProfileDeleteCustomer ( merchantAccountName; txKey; customerProfileId ) — This function is used to delete a customer profile.
- CCProfileDeletePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} ) — This function is used to delete a payment profile associated with a customer profile.
- CCProfileDeleteShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId ) — This function is used to delete 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.
- CCProfileUpdateCustomer ( merchantAccountName; txKey; customerId, customerProfileId {; key1=value1; key2=value2; ...} ) — This function is used to update a customer profile associated with a customer profile created
using Authorize.
- CCProfileUpdatePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; cardNumber; expirationDate{; key1=value1; key2=value2; ...} ) — This function is used to update a payment profile associated with a customer profile created
using Authorize.
- CCProfileUpdatePaymentACH ( merchantAccountName; txKey; customerProfileId; paymentProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} ) —
- CCProfileUpdateShipping ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} ) — This function is used to update a shipping profile associated with a customer profile.
- CCProfileValidatePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} ) — This function is used to validate a payment profile associated with a customer profile.
- 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.
- CCRegister ( licenseKey ; registeredTo ) — Registers the CreditCardProcessor Plugin.
- CCSetCertificate ( certificate ; password ) — This function is used to set the security certificate for the First Data gateway.
- CCSetErrorCapture ( errorCapture ) —
- CCSetGateway ( gatewayName {; cardPresent=false ; key1=value1; key2=value2; ...} ) — Switch which gateway to use (the default is authorize.net).
- CCSetTestMode ( testModeSetting ) — Puts the credit card plugin into test mode.
- 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
CCCancelSubscription ( merchantAccountName; txKey; subscriptionId {; key1=value1; key2=value2; ...} )
merchantAccountName
txKey
subscriptionId
paramStrings
CCCreateSubscription ( merchantAccountName; txKey; dollarAmount; cardNumber; expirationDate; subscriptionNameOrId; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
merchantAccountName
txKey
dollarAmount
cardNumber
expirationDate
subscriptionNameOrId
numberOfInstallments
startDate
payPeriod
frequency
paramStrings
CCCreateSubscriptionACH ( merchantAccountName; txKey; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
merchantAccountName
txKey
dollarAmount
accountNumber
routingNumber
bankName
accountType
accountHolderFirstName
accountHolderLastName
subscriptionName
numberOfInstallments
startDate
endDate
payPeriod
frequency
paramStrings
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
cardNumber
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 CCProcessPayment. To use this, you must first process a payment. If you call this without processing a payment first, it will return the following error:
You must process a payment with the CCProcessPayment function before calling this function
Authorize.net
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
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 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; ...} )
merchantAccountName
txKey
previousSubscriptionId
dollarAmount
cardNumber
expirationDate
subscriptionName
numberOfInstallments
startDate
endDate
payPeriod
frequency
paramStrings
CCModifySubscriptionACH ( merchantAccountName; txKey; previousSubscriptionId; dollarAmount; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName; subscriptionName; numberOfInstallments; startDate; endDate; payPeriod; frequency {; key1=value1; key2=value2; ...} )
merchantAccountName
txKey
previousSubscriptionId
dollarAmount
accountNumber
routingNumber
bankName
accountType
accountHolderFirstName
accountHolderLastName
subscriptionName
numberOfInstallments
startDate
endDate
payPeriod
frequency
subscriberFirstName
subscriberLastName
paramStrings
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 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.
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
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
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)
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
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
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
CCProfileDeleteCustomer ( merchantAccountName; txKey; customerProfileId )
This function is used to delete 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
CCProfileDeletePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} )
This function is used to delete a payment profile associated with 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
CCProfileDeleteShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId )
This function is used to delete a shipping profile associated with 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
shippingProfileId
- a shipping profile ID associated with the customerProfileId
CCProfileGetCustomer ( merchantAccountName; txKey; customerProfileId )
This function is used to retrieve an existing customer profile.
merchantAccountName
txKey
customerProfileId
CCProfileGetPayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId )
This function is used to retrieve an existing payment profile.
merchantAccountName
txKey
customerProfileId
paymentProfileId
CCProfileGetShipping ( merchantAccountName; txKey; customerProfileId; shippingProfileId )
This function is used to retrieve an existing shipping profile.
merchantAccountName
txKey
customerProfileId
shippingProfileId
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
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 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
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
a problem (use CCLastError for more detailed information about the nature of the error)
CCProfileUpdateCustomer ( merchantAccountName; txKey; customerId, customerProfileId {; key1=value1; key2=value2; ...} )
This function is used to update a customer profile associated with a customer profile created using Authorize.net's Customer Information Manager system.
merchantAccountName
- your payment gateway merchant account name
txKey
- your payment gateway merchant account name
customerProfileId
- a Customer Information Manager system customer profile ID
CCProfileUpdatePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId; cardNumber; expirationDate{; key1=value1; key2=value2; ...} )
This function is used to update a payment profile associated with a customer profile created using Authorize.net's Customer Information Manager system. The credit card information used to update this profile will replace the credit card information currently stored in the 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
cardNumber
- the credit card number
expirationDate
- the credit card expiration date
CCProfileUpdatePaymentACH ( merchantAccountName; txKey; customerProfileId; paymentProfileId; accountNumber; abaRoutingNumber; bankName; accountType; accountHolderFirstName; accountHolderLastName {; key1=value1; key2=value2; ...} )
merchantAccountName
txKey
customerProfileId
accountNumber
abaRoutingNumber
bankName
accountType
accountHolderFirstName
accountHolderLastName
CCProfileUpdateShipping ( merchantAccountName; txKey; customerProfileId {; key1=value1; key2=value2; ...} )
This function is used to update 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
shippingProfileId
- a Customer Information Manager system shipping profile ID, like the one returned by a successful call to CCProfileCreateCustomer
CCProfileValidatePayment ( merchantAccountName; txKey; customerProfileId; paymentProfileId {; key1=value1; key2=value2; ...} )
This function is used to validate a payment profile associated with 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
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
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 the form of additional
parameters:
- 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.
CCRegister ( licenseKey ; registeredTo )
Registers the CreditCardProcessor Plugin.
licenseKey
- a valid license key string, or the literal string "DEMO" to run in demo mode.
registeredTo
- the company name for the license key used.
CCSetCertificate ( certificate ; password )
This function is used to set the security certificate for the First Data gateway. Users with First Data merchant accounts must access their account online and download a security certificate. In order to access the First Data gateway with Plastic, you must insert this file into a container field and call this function. Make sure you have set the gateway to First Data using CCSetGateway before calling this function.
Note: You should only have to call this function once per session.
data
- A container field containing the security certificate
CCSetErrorCapture ( errorCapture )
CCSetGateway ( gatewayName {; cardPresent=false ; key1=value1; key2=value2; ...} )
Switch which gateway to use (the default is authorize.net).
The following gateways are supported:
- Payflow Pro
- Authorize.net
- eSELECTplus
- First Data
- GIACT
- InternetSecure
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.
CCSetTestMode ( testModeSetting )
Puts the credit card plugin into test mode. Pass in a 1 for test mode or 0 for live mode. When in test mode, all credit card charges will be sent to a special test server that runs the normal verification process, but does not run real charges.
testModeSetting
- a 1 for test mode or a 0 for live mode
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 the GetValue
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
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 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.