Update, Nov 2009: I've just discovered and fixed a bug I introduced in the 2.2 branch for the IATS plugin. The bug was introduced when i updated the API files from IATS and failed to notice that the legacy method for C$ one-time donations was no longer supported.
If you're using a version greater than or equal to 2.2.7, and are using IATS for C$, non-recurring donations, then you're affected.
To fix it edit the file : CRM/Core/Payment/IATS.php, and remove the line that looks like this:
The full fix removes a conditional branch based on that value a little further on, but by removing this line, it'll never actually use that branch. Drop me a line if you have any questions.
$canDollar = ($params['currencyID'] == 'CAD'); //define currency type
Update, May 2009: This post is still getting quite a bit of traffic, which is great. Here are a few important things to note:
- The IATS plugin code is in CiviCRM, you don't need to add any code.
- You do still need to add it to the database [i think this will change soon], following the instructions below under "Install"
- It should work for Joomla as well, as per: http://forum.civicrm.org/index.php/topic,8032.msg35035.html#msg35035 but the urls in the install section are different.
I'm happy to report that I've taken up an abandoned project from a year ago and just finished it. Thanks to Heritage Toronto who hired Anarres Worker Co-op and Paul Newby and myself to give them a new site
My project consists of writing a 'payment processor plug-in' that allows CiviCRM websites run by non-profits to accept donation/payment/memberships using IATS.
The reason this is interesting is because:
- CiviCRM is a great 'CRM' (client relationship management) piece of software designed for non-profits.
- IATS is the best alternative for non-profits in Canada who need a transaction processor (i.e. anyone who wants to accept money on-line).
- There wasn't any way to use them together.
So .. the rest of this post is aimed at any of you out there who want to try it. I'm going to provide a link to my code + instructions. Note that this is ONLY for CiviCRM versions since 1.7, since the payment plug-in structure changed at that point, and I've only tested it on 1.8 and 1.9.
Here's a zipped tarball, with:
CRM/Core/Payment/IATS.php CRM/Contribute/Payment/IATS.php packages/Services/IATS/iatslink.php packages/Services/IATS/creditcard.php packages/Services/IATS/iats_reoccur.phpjust put it in your civicrm installation root and do a
tar -xvzf iats.tgz
This is now updated code as of Feb 26 to fix the previous issue with extra spaces. It also has support for US$ and recurring donations.
InstallIn order to test the code, you need to:
- Add a new payment processor type from this path (for Drupal):
/civicrm/admin/paymentProcessorType?reset=1or for Joomla:
/administrator/index2.php?option=com_civicrm&task=civicrm/admin/paymentProcessorType&action=add&reset=1As far as I know, this isn't documented.
- Use "IATS" for Title and Name
- Billing Mode is 1
- "Payment_IATS" is the PHP class name
- use "Agent Code" for the Signature Label
- put in "https://www.iats.ticketmaster.com" for both of the live URLs
- put in "http://www.iats.ticketmaster.com" for both of the test URLs
- it does support recurring donations (but see below)
- Add a new payment processor to your site:
/civicrm/admin/paymentProcessor?reset=1[Check your documentation for Joomla, it'll be different]. This is better documented but I'll make it easier for you:
- Put IATS for your Name
- For your live payments, you can put in your Agent Code and Password, or use the test one of "TEST88" (user and pass)
- For your tests, use the test one ... you keep the urls you put in as defaults earlier.
- And now add the paypage, I'll let you figure that one out.
And that's all. Please don't try this on a production server, I'm not providing any guarantees. I have tested it on CiviCRM 1.8 and 1.9, it should work on 2.
Update Feb 26 I've added in some code for US$ and recurring donations. The only problem with recurring donations is that IATS doesn't accept all the options that CiviCRM assumes it will, so you have to create a custom template to restrict this. Please RTFM to see how this is done - the file you want is: CRM/Contribute/Form/Contribution/Main.tpl