Opentaps CreditCard Setup

From Opentaps Wiki
Revision as of 00:43, 27 September 2007 by Sichen (talk | contribs)
Jump to navigationJump to search

Credit Card Processing with Opentaps

To set up credit card processing is very simple. First, find a processor that is already supported by looking in applications/accounting/servicedef/ for a services file. If one of these processors is supported, then just obtain the credentials for those processors and enter it into applications/accounting/config/payment.properties.

Then, for each product store in the Catalog > Stores >> Payments tab, configure the service in the services_XXX.xml file for the payment method type of Credit Card. Typically, you will need to configure the services for authorize, capture, release, and refund. Here is an example of a setup for using Authorize.NET:

Authorize.net.settings.png

Beware that each processor has its own quirks.

Authorize.net Setup

After you receive your "Welcome to Authorize.net" email and get your payment gateway ID, you will have to login to their site and activate your account. At the end of that process you will be presented with your transaction key and login. Both those fields will appear to be random letters and numbers.

Configuring opentaps for Authorize.NET

Edit YOUR_OPENTAPS_DIRECTORY/applications/accounting/config/payment.properties

Look near the bottom of the file, below the following text:

############################################
# Authorize.Net Configuration
############################################

Change the settings and put in your transaction key and transaction login that you got when you activated your account.

  • payment.authorizedotnet.trankey=INSERT_YOUR_KEY_HERE
  • payment.authorizedotnet.login=INSERT_YOUR_LOGIN_HERE

Note: the above login is not the same as your login to authorize.net's website

VERY IMPORTANT SECURITY NOTICE

Before going into production with real credit cards, set this flag from the default true:

  payment.authorizedotnet.test=TRUE

to false:

  payment.authorizedotnet.test=FALSE

Otherwise opentaps will log the credit card numbers in your log files.

Authorize.net Modes

What is Test Mode?

Test Mode allows you to test your connection to the payment gateway. Transactions submitted while your account is in Test Mode are NOT actually authorized or charged to any account numbers provided for the transactions.

Note: Test transactions are not stored by the payment gateway and will not be viewable in search results or reports.

For more details on the different methods for submitting test transactions, please review the Integration Guide for your connection method.

Changing Modes

After initial setup, your payment gateway account will be in Test Mode by default. This allows you to immediately test your connection to the payment gateway before you submit real transactions. However, you may turn Test Mode ON or OFF anytime you need to test changes to your payment gateway connection or to restore live transaction processing.

Turn Test Mode Off

To turn Test Mode off:

Step 1: Login to your Merchant Interface at https://secure.authorize.net

Step 2: Click Settings in the main left side menu.

Step 3: Click Test Mode.

Step 4: Click Turn Test OFF. A confirmation message indicates that the setting has been successfully applied.

Turn Test Mode On

To turn Test Mode on:

Step 1: Click Settings in the main left side menu.

Step 2: Click Test Mode.

Step 3: Click Turn Test ON. A confirmation message indicates that the setting has been successfully applied

Note: Please be sure to verify that Test Mode is OFF anytime you need to submit real transactions.

Authorize.net Test Mode Card Numbers

Any of the following card numbers can be used to run tests on your Authorize.Net account. It must be noted that these are not real card accounts, and will not generate an approval if your account is in live mode. They will return a decline in live mode, and an approval in test mode.

Sample numbers to use

Use any expiration date after today.

370000000000002 American Express Test Card
6011000000000012 Discover Test Card
5424000000000015 MasterCard Test Card
4007000000027 Visa Test Card
4012888818888 second Visa Test Card
3088000000000017 JCB 
38000000000006 Diners Club/ Carte Blanche 
4222222222222 Visa Error Test

The last testing card number is used to generate errors. THIS CARD IS INTENDED TO PRODUCE ERRORS, and should only be used if that is your intent--for example, if you are testing your site to see how it will respond to Authorize.Net errors. To cause the system to generate a specific error, send a transaction with the card number 4222222222222, and an amount equal to the number of the error you want the system to return.

For example, if a transaction is sent to the system in test mode with a credit card number of 4222222222222, and an amount of 12 dollars, the system will respond with error 12, "Authorization Code is required but is not present"

Authorize.NET Quirks

Authorize.NET will not be able to refund captures which are more than 60 days old. It will also not be able to refund captures which have not yet settled. The problem is that it does not have an API that tells you which captures have settled and which have not, so the service tries to refund, then release. This may not always work, but that does not appear to be a better solution.