I've set up a form to take payment from PayPal and I believe I have followed the directions given in the user manual. I'm using a PayPal sandbox account that I have used successfully before for testing. If I cancel a transaction at paypal, or even if I complete it, I get returned to the page on my site with the form on it and a red message says:
A critical error has occurred. Object reference not set to an instance of an object.
I was expecting to be redirected to a page in my website that I have prepared to show a message saying the transaction was either unsuccessful, or successful if appropriate, because I have set up completion events for those URL redirections.
So basically, instead of the redirections, I'm getting this error message.
Please help me get the redirection events working.