Difference between revisions of "2CheckOut"

From WHMCS Documentation

(Callback Setup)
Line 1: Line 1:
==Callback Setup==
+
==Recurring Billing==
  
To setup the callback process for 2CheckOut to automatically mark invoices paid, go to the '''Account > Site Management''' section in the 2CO Vendor Admin and set "Direct Return" to "Given links back to my website" and the "Approved URL" to http://www.yourdomain.com/whmcs/modules/gateways/callback/2checkout.php
+
As of WHMCS V4.5, it is possible to have automated recurring billing agreements created with 2CheckOut from WHMCS.  This is done using the 2CheckOut API and so if you wish to use this functionality you will need to enter your API Username & Password in the module config (see below for details).
  
==Secret Word==
+
==Module Setup==
  
For added security, on the same page you can set a "Secret Word".  If you set this, in the payment gateway configuration page of your WHMCS system, enter the same secret word so that WHMCS can verify that the callbacks it receives are coming from 2CheckOut.
+
===Notifications===
  
==API Username/Password==
+
To setup the callback process for 2CheckOut to automatically mark invoices paid, you will need to login to your 2CheckOut account and then go to the '''Notifications''' section of your account.  There you should see a field for a '''Global URL'''.  In that field, enter the url http://www.yourdomain.com/whmcs/modules/gateways/callback/tco.php and then click '''Apply'''.  Also click the '''Enable All Notifications''' button and then save to complete.
  
You can set your 2CheckOut API username & password in these fields if you wish to be able to automatically process refunds from WHMCS.  These fields are optional and can be left blank.
+
===Secret Word===
 +
 
 +
For added security, you can set a '''"Secret Word"''' inside your 2CheckOut account @ '''Account > Site Management'''.  If set, this is then used to validate callbacks are authentic and it is therefore '''recommended''' that you do this.  If you choose to enable it, then you must also enter the exact same word that you set inside the 2CheckOut control panel into the WHMCS Secret Word field in '''Setup > Payment Gateways'''
 +
 
 +
===API Username/Password===
 +
 
 +
If you wish to be able to use the '''recurring billing and/or automatically refunds functionality''' within WHMCS, then you must setup a 2CheckOut API user and enter the details in these fields.
 +
 
 +
To setup an API user, you will need to login to your 2CheckOut account and go to '''Account > User Management > Create Username'''.  Once there you will be asked to enter an email address, username & password, security question & answer, and then select the permissions for the userYou just need to select '''API Access & API Updating''' for the permissions.  Once you've done that you would then enter the same username & password that you just created into the appropriate fields inside WHMCS.
  
 
==Error Messages==
 
==Error Messages==
 +
 
===Test Mode Limitation===
 
===Test Mode Limitation===
  
Please note when using demo mode, that all callbacks will fail with the error MD5 Hash Failure if a secret word is specified.  This is done intentionally by 2Checkout to protect those who sell digital goods from fraudulent purchases through the demo mode.
+
Please note that when using demo mode, all callbacks from 2CheckOut will fail with the error MD5 Hash Failure if a secret word is specified.  This is done intentionally by 2Checkout to protect those who sell digital goods from fraudulent purchases through their demo mode.
  
 
===MD5 Hash Failure===
 
===MD5 Hash Failure===
  
A MD5 Hash Failure error under Billing > Gateway Log indicates that the Secret Word in Setup > Payment Gateways does not match the Secret Word in the 2CheckOut control panel. They must match exactly.
+
An MD5 Hash Failure error under '''Billing > Gateway Log''' indicates that the Secret Word in '''Setup > Payment Gateways''' does not match the Secret Word in the 2CheckOut control panel. Double check your entry is exactly right, and check for any invisible trailing spaces if so.

Revision as of 19:59, 17 May 2011

Recurring Billing

As of WHMCS V4.5, it is possible to have automated recurring billing agreements created with 2CheckOut from WHMCS. This is done using the 2CheckOut API and so if you wish to use this functionality you will need to enter your API Username & Password in the module config (see below for details).

Module Setup

Notifications

To setup the callback process for 2CheckOut to automatically mark invoices paid, you will need to login to your 2CheckOut account and then go to the Notifications section of your account. There you should see a field for a Global URL. In that field, enter the url http://www.yourdomain.com/whmcs/modules/gateways/callback/tco.php and then click Apply. Also click the Enable All Notifications button and then save to complete.

Secret Word

For added security, you can set a "Secret Word" inside your 2CheckOut account @ Account > Site Management. If set, this is then used to validate callbacks are authentic and it is therefore recommended that you do this. If you choose to enable it, then you must also enter the exact same word that you set inside the 2CheckOut control panel into the WHMCS Secret Word field in Setup > Payment Gateways

API Username/Password

If you wish to be able to use the recurring billing and/or automatically refunds functionality within WHMCS, then you must setup a 2CheckOut API user and enter the details in these fields.

To setup an API user, you will need to login to your 2CheckOut account and go to Account > User Management > Create Username. Once there you will be asked to enter an email address, username & password, security question & answer, and then select the permissions for the user. You just need to select API Access & API Updating for the permissions. Once you've done that you would then enter the same username & password that you just created into the appropriate fields inside WHMCS.

Error Messages

Test Mode Limitation

Please note that when using demo mode, all callbacks from 2CheckOut will fail with the error MD5 Hash Failure if a secret word is specified. This is done intentionally by 2Checkout to protect those who sell digital goods from fraudulent purchases through their demo mode.

MD5 Hash Failure

An MD5 Hash Failure error under Billing > Gateway Log indicates that the Secret Word in Setup > Payment Gateways does not match the Secret Word in the 2CheckOut control panel. Double check your entry is exactly right, and check for any invisible trailing spaces if so.