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

It is becoming aparent that I do some of my best work on the eves of holidays. So, it is new years eve, and here we go with an update to the Virtuemart + Pesapal plugin that I published on Christmas eve.

It came to my attention that Pesapal actually have an official plugin for virtuemart 2.0. I suppose, the more, the merrier. The only problem is for my test in Joomla 2.5 and latest virtumart, the plugin does not work. I also found quite a few issues it you have their plugin and my plugin installed. These therefore are the issues I am addressing in this update.

Changelog:
  • Added default image for pesapal upon installation of plugin
  • Changed name of plugin to btgpesapal to avoid conflict with Pesapal’s official plugin
  • Added check for shared php classes oauth and xmlhttprequest just incase another installed plugin is already implementing them thus preventing re-delaration errors
  • Added sys.ini language file for use on the front end of the Virtuemart shopping cart.
  • Added btgpesapal folder during installtion to avoid placing class files in root of plugin folder.
Tested On:
- Virtuemart v2.0.14
- Joomla v2.5.8
- PHP v5.3.10 & MySQL v5.5.20

DOWNLOAD VERSION 2.1

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 named BTGPesaPal and will by default, install into a sub folder named btgpesapal 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 btgpesapal, 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 are advised (not required)to uninstall other pesapal plugins to avoid unforseen conflicts – especially with shared classes.

INSTALLATION:
  1. Download the btgpesapal.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 BTGPesaPal 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, HAPPY NEW YEAR!!

Share

21 comments

  1. I tested this on virtualmart 2.0.18a and it doesnt seem to appear on payment method options.
    When i save i get the following error.

    Warning: The magic method __set() must have public visibility and cannot be static in /home/**/public_html/shop/demo/plugins/vmpayment/btgpesapal/btgpesapal/xmlhttprequest.php on line 10

    Warning: The magic method __get() must have public visibility and cannot be static in /home/**/public_html/shop/demo/plugins/vmpayment/btgpesapal/btgpesapal/xmlhttprequest.php on line 33

    ps: on ** i have left out my domain name.

  2. Hi Native. Sorry for late reply. The warning are expected – it a known bug in the version of the xmlhttprequest class that pesapal requires. So to remove the warning, just turn off display of errors from the Global configuration of your joomla setup. I know its a work around and not a solution, but it will have to do until we improve the class.

    As for why you may not be seeing it as a payment option, please ensure you have enabled the plugin after installing it, and then added a new payment method in VM using the plugin as the method of payment. Should you still get errors, please feel free to ask here and i will see how to help you.

  3. Hi Allan,
    Thanks for the feedback. Your payment plugin works very well. you should share it with the pesapal team as they dont have a ready to install plugin. they just send a bunch of codes.

  4. Hi Allan, i tested the plugin on vm2.0 and it works fine. Good work. Do you have a similar plugin that can work with Hikashop?

  5. I really should get back on the Pesapal thing, now that I noticed they changed a few things here and there. Let me get back to you on this as even this plugin needs updating…

  6. this is a great plugin!however i would like to know what the redirect page is after one has inputted the transaction confirmation code, mine does not work

  7. I installed this plugin on a VM 2.0.22, Joomla 2.5.14 and it worked for a brief moment, displaying the payment options on an iframe then later started showing a blank page upon clicking ‘Confirm Purchase’. I thought it was VM2 or Joomla 2.5.14 or Template bug but once I used another payment plugin i.e Paypal, the paypal plugin redirected to the Paypal page with no fuss at all.

    So it seems there is a bug with this plugin on the versions of Joomla nd VM am using… can you help?

  8. Hi Allan, I have recently added Pesapal to a newly built virtuemart site (Joomla 2.5.17, VM 2.0.26) however when payment options are displayed all that appears is a checkbox with Pesapal and the logo rather than any payment method both in sandbox and real mode. Am I being really dumb but how do I get the plugint o function and redirect?

  9. I need to create a custom plugin for pesapal to intergrate with other components….can your plugin work with other components or its just virtualmart??

  10. This plugin is just for Virtuemart. To integrate Pesapal to other components – you would need to follow Pesapal’s integration guide and the payment gateway development guide for the plugin you wish to integrate Pesapal to. Or you can ask for help here – and from pesapal.

  11. Hi Allan any update on the PLugin .. after i input the transaction code it take me to a ‘you being redirected’ page and it stalls for ages though the payment goes through and actually get alerts on my phone on the transaction ..though on the browser it doesnt show

Leave a Reply