Monday, 14 February 2011

Bye bye

I've got a new job, which no longer involves working with Netcommunity - so I think it's time to stop updating this blog. I leave this job in a few weeks but I will be busy between now and then sorting everything out, so this will probably be the last update.

I'll leave the blog online, for reference. Hopefully some people will find it helpful.

Thanks for reading!

Thursday, 20 January 2011

Custom Donation Form

There is a good example on Blackbaud Labs of a custom donation form for Netcommunity. It's a good example that you can build on and use to create (for example) a shop feature for Netcommunity, or some other kind of custom part that can take payment.

A while ago I converted the code to C#. It worked really nicely - payment would be taken from a card, and the transaction sent into the Netcommunity plug-in in Raiser's Edge.

However, I noticed that if an invalid card number was entered and submitted, the 'Thank you for donating' message would still come up, even though the transaction was not processed and the money was not taken. This is the bit of code that deals with it:

try
{
BBNCExtensions.API.Transactions.Donations.RecordDonationReply oReply = this.API.Transactions.RecordDonation(oArgs);

}

There are a series of catch statements following this that are intended to catch any problems that might arise. None of them seem to catch an invalid card number or anything like that, though. This means that any code in the try statement will be executed, irrespective of whether or not the card has been approved, as no error appears to be thrown.

One way of checking whether the transaction has been authorised and it's OK to go on is by including this just after RecordDonation:

if (oReply.CreditCardAuthorizationResponse.ResultCode.ToString() == "Approved")

If 'Approved' is returned, you're good to carry on.

I'm not sure whether this problem is unique to us and our merchant (IATS), but this solution seems to have solved the problem.

Wednesday, 12 January 2011

Raiser's Edge Admin crash on Windows 7

Not Netcommunity-related, but it might be of help to anyone who encountered the same problem I did.

Since upgrading my workstation to Windows 7, Raiser's Edge 7.91 had started crashing every time I tried to open the Admin tab.

I tried running it in various different compatibility modes, as I assumed that the problem was being caused by Windows 7. What I forgot was that after installing Windows 7, I also installed the beta of Internet Explorer 9.

I ran a debugger on the Raiser's Edge crash and noticed that MSHTML.DLL was causing the crash - so I uninstalled IE9 and reverted back to IE8. That fixed the problem.

IE9 is a great browser, but it's not compatible with Netcommunity (particularly the text editor) and it also breaks Raiser's Edge on Windows 7. For now, keep IE9 away from Blackbaud software until they sort this out.

It's a shame, as it's a great browser, but clearly MSHTML has changed significantly enough to break Raiser's Edge.