Many Pies

Many Pies

Tuesday, June 16, 2009

Validating Direct Debits with Blackbaud NetCommunity

There's a bug in NetCommunity 5.1 whereby it lets your donor specify a one-time Direct Debit payment, which when it is brought through to RE doesn't work properly as it isn't a Recurring Gift.

In addition, we don't want the donors to do recurring credit card gifts as the current version of RE - 7.85 - stores Credit Card info in the database. (An upcoming PCI compliant release won't do this.)

So I've written a bit of Javascript to check the frequency and payment type and give an error message. Unlike my previous script, it doesn't have a hardcoded prefix which is needed to find the ids of some of the page elements. Instead it looks at a variable which is part of the donation form to get the prefix. This may mean it won't work in other versions of NetCommunity.

function xyzCheckDD()
var xyzPrefix = '';
var ErrorText = 'Please use \"One time\" frequency with credit cards, 1st or 15th with Direct Debits';
//We look at one of the variables that's defined to find out the prefix for this page. If they go into four digits
// e.g. PC1001_ then this will need to change.
xyzPrefix = Page_Validators[0].controltovalidate.substring(0,6);

//Check frequency and Payment option. It doesn't have a unique id, so we find the checkbox, go up to the parent

bRecur = document.getElementById(xyzPrefix + 'Recurrence1_ddlFrequency').selectedIndex != "0";
bDD = document.getElementById(xyzPrefix + 'DonationCapture1_rdoPaymentOption_1').checked;
//This does an XOR - true if they are different
if( bRecur ? !bDD : bDD ) {
// Put some debug here if required
function runit2(){


Robert McAllen, Programme Manager, Blackbaud said...


Just to let you know that we've tweaked the recurring gift functionality in version 6.10 (due this month) so that you can now create a recurring only donation form which allows you to switch off one time gifts on any donation form.

We recognised that folks would want to switch this off on some forms hence the change.

One other quick comment - The forthcoming releases of BBNC(6.10) and RE(7.91) are both PA-DSS compliant builds of the software. We have completed this work well in advance of the scheduled cut off dates (set by the c/c providers) for this work being completed by clients of next year (see for dates etc) to give everyone the ability to get PCI compliant well in advance of the final dates.

Finally, I'd also recommend that you look to upgrade from 5.1 of BBNC ASAP as you are missing a whole heap of new functionality which I'm sure you'd love plus some security patches and probably more importantly, for you ;-), some great updates to our API!!

Let me know if you have any questions Paul.


Robert McAllen

Paul Morriss said...

Thanks for taking the time to comment. I'm glad that bug has been fixed. I'm waiting on my colleagues to do a server upgrade before we can move off 5.1.