Sincerely apologize for the delay in posting the code.
I am attaching the code for your review. Please review the code and/or modify for the correction wherever necessary.
The customization what we are doing is a light weight and the same we are offering to our clients who are using Joomla! and CiviCRM.
Please review and do get back for the clarifications (if any).
Once again heart felt sorry for the delay.
Please do include our payment processor in the coming version and give us a chance to serve the Open Source Community.
Thanks so much!
Developer for Click and Pledge.