Free PesaPal Payment Plugin Virtuemart 2.0 (Joomla 1.5/1.6/1.7/2.5/3.0)

Its been a while since I have given out free code. Not that I have not been developing. On the contrary, I think I have been developing a bit too much, causing me to forget to give back to the community that helps me develop in the first place.

It is Christmas Eve, and the world should have ended three days ago – according to the Myans. Now that we are all still here, well, I suppose it is time I release this plugin that I have had in my archive for quite a while, but simply had not gotten the time to publish it on the site. So here goes.

Tested On:
- Virtuemart v2.0.14
- Joomla v2.5.8
- PHP v5.3.10 & MySQL v5.5.20

DOWNLOAD VERSION 2.0

LICENSE:

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 :-)

IMPORTANT NOTE:

This Virtumart plugin is aptly names PesaPal and will by default, install into a sub folder named pesapal under the vmpayment plugins folder. If you have any other PesaPal Payment plugin already installed on for your Virtuemart setup and it is also named pesapal, please ensure you have a backup of the installation archive for the plugin you installed, just in case you may want to go back to it. You will then be required to uninstall said Pesapal virturnart plugin.

INSTALLATION:
  1. Download the pesapal.zip from here.
  2. Login to your administration panel (back-end)
  3. Check that you don’t already have someone else’s virtuemart pesapal payment plugin via the plugin manager available in Joomla
  4. Install the downloaded plugin as you would any other Joomla extension
  5. Enable the newly installed PesaPal Plugin from Joomla’s plugin manager.
  6. Go to Components > Virtuemart > Shop > Payment Methods > New
  7. Fill in the corresponding form appropriately, ensuring you select PesaPal from the Payment Method Dropdown of available plugins – to tie your newly created payment method with the just installed PesaPal plugin.
  8. Click Apply (J1.5) or Save (J1.6/1.7/2.5/3.0) to enable configuration options of the plugin
  9. Click on the Configuration tab (next to Payment Method Information tab)
  10. 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
    • Demo Mode (sandbox) is a toggle to switch between using the plugin in test mode with credentials from http://demo.pespal.com or live mode with actual credentials.
    • Payment Currency Please select the currency that is used for pesapal payments
    • Email Currency Unnecessary for now.
    • Countries should be the countries (billing and shipping addresses) where PesaPal is acceptable
    • AmountsI are other charges that may apply to PesaPal. They can be left blank if the do not apply.
    • Order Statuses should be the statuses that Orders change to depending on repsonse from pesapal.
  11. Click on the “SAVE” (J1.5) or Save and Close (J1.6/1.7/2.5/3.0) icon again (top-right) to save the Pesapal configuration. NB You can update the configurations at any time.
  12. Test as appropriate.

Should there be any bugs in this plugin, please do advise and I will look into them and solve / update the plugin.

And lastly, MERRY CHRISTMAS!

Share

9 comments

  1. Man you are the bomb. Thats whatI have looking forward to. I have tried the official pesapal plugin but they didnt follow the virtuemart guidelines and hence not working.

    I hope they will make your plugin the official pesapal plugin because it works without a problem.

    NB: You modify it to allow the loading of the pesapal logo.
    Also see the following message it returns at the end of the checkout process

    Warning: The magic method __set() must have public visibility and cannot be static in /xxxx/plugins/vmpayment/pesapal/xmlhttprequest.php on line 10

    Warning: The magic method __get() must have public visibility and cannot be static in /xxxx/plugins/vmpayment/pesapal/xmlhttprequest.php on line 33

    Otherwise thank you very much for this Christmas Gift.

    MERRY CHRISTMAS

  2. Hi Micheal

    I wonder what could be wrong with the official plugin – I will have a look-see at their code and maybe improve my code from their examples (or vice versa). As for the errors, I will look into them, hopefully without having to modify the xmlhttprequest class since it is a standard class. In the mean time, to avoid displaying the warnings, you could set your error settings for php to not display warnings and notices (and only display fatal errors) or you could simply switch off error displaying from the Joomla back end. Not good solutions but they will allow you to use the current plugin without those nasty warning messages.

  3. Hi

    Your plugin is a life saver, but one issue it has an issue with recorgnizing the currency , when one chooses Us $ eg 32$ what you get from the pesapal payment form is Ksh 32

  4. Hi adrian. You are right about that. I will look into adding currency checking and exchange rate calculations. Do you happen to know any freely available worldwide service that will offer exchange rates via a suitable API?

  5. Allan, do you have this plugin updated for Joomla 3.4? and were you able to do the exchange rates bit?

  6. Not worked on Virtuemart and Pesapal for a while – demand on use that extension seemed to have fallen off – so I cant promise I will do a plugin for the latest version of Virtuemart and Joomla – but feel free to watch this space – if you don’t mind. Subscribe to the blog and you will be notified accordingly.

Leave a Reply