Since my last release of a PesaPal module for public consumption, PesaPal has changed a few thing, which I believe I have mentioned from time to time on this forum. They are working on improving their system, and in as much as they are not where I would like them to be, at least they are more secure for sure.
The downside of these improvements to PesaPal is that my old plugin was broken and I have now just updated it. Please find below details on how to install the PesaPal payment module for Virturmart 1.1.9.
Please note that this is a major update and the old code will not work. And due to that, I am simply going to change all download links to the newer improved version of this code.
- Virtuemart v1.1.9 - Joomla v1.5.26 - PHP v5.3.10 & MySQL v5.5.20
These scripts are offered freely and in good faith. Please do not pass this off as your own work or try to sell it without due credit. Check back with us at ajagwe.com for updates/fixes. If you want more support/work done to it, you could consider a donation
If you have any other PesaPal payment module(s) already installed on your Virtuemart setup, then make a copy, as a backup, of the following files (if they exist in your system):
/administrator /components /com_virtuemart /classes /payment /OAuth.php /ps_pesapal.php /ps_pesapal.cfg.php /html /checkout.pesapal.php
- Download the pesapal_payment_module.zip from here.
- Unzip the files to a temporary drive on your local computer
- Check that you don’t already have someone else’s pesapal payment module by looking in the folder as per my “Important Note” section above.
- Upload the OAuth.php, xmlhttprequest.php, ps_pesapal.php and ps_pesapal.cfg.php files to the directory (/administrator/components/com_virtuemart/classes/payment)
- Upload checkout.pesapal.php to the directory (/administrator/components/com_virtuemart/html)
- Login to your administration panel (back-end)
- Go to Components > Virtuemart > Store > List Payment Methods > New
- Ensure the “Active” checkbox is enabled (ticked)
- “Payment Method Name” should be PesaPal (doesn’t have to be but it’s easier to remember)
- “Code” is PESAPAL (again just easier to remember)
- Next to “Payment class name”, select ps_pesapal from the drop-down.
- For “Payment method type”, put a dot next to the HTML-form based (e.g. Paypal)option.
- Click on the “SAVE” icon (top-right).
- You should be returned to the “Payment Method List” page, click on the PesaPal entry you just made.
- Click on the Configuration tab (next to Payment Method Form tab)
- There should be a message saying that ps_pesapal.cfg.php is Writeable. If it isn’t then check the permissions on the file using your FTP client.
- Complete the fields just under this message as appropriate.
- Merchant key should be the merchant key provided to you by pesapal. The module defaults to a test merchant key from the pesapal website
- Secret key should be the secret key provided to you by pesapal. The module defaults to a test secret key from the pesapal website
- Return URL should be the root of your website as the module and pesapal will add several parameters to it for checkout confirmation. This is editable to any other URL that you may desire to handle responses from pesapal
- Cancel URL this can be left blank of the same as return URL. Functionality put in place for the day that pesapal adds a cancel link or button in their system
- Order Statuses should be the statuses that Orders change to depending on repsonse from pesapal. Please note that these are editable from Virtumart Orders Menu
- Confirmation Message is the message a user will get upon successful confirmation of a transaction from pesapal
- Error Message is the message a user will get upon report of an error in the transaction from pesapal
- Open the file payment_extra_info.txt (from the temporary folder where you extracted the modules files) and copy its content into the Payment Extra Info field of the form.
- Click on the “SAVE” icon again (top-right).
- Test as appropriate