VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: aerdna on August 07, 2016, 22:42:10 PM

Title: vmpayment plugin class - derive from vmPaymentPlugin or vmPSPlugin?
Post by: aerdna on August 07, 2016, 22:42:10 PM
I'm trying to learn more about developing plugins and want to create a payment plugin for Virtuemart 3. I'm running Joomla 3.4.8 and VM 3.0.12.

I'm using the docs below but neither of these links are completely consistent with how the existing payment plugins I have as an example are implemented:
http://dev.virtuemart.net/projects/virtuemart/wiki/Payment_Plugins
https://docs.joomla.org/Plugin

I'm using existing payment plugins as a basis but I'm confused by the documentation I'm finding.  Do I derive my plugin class from vmPSPlugin or use vmPaymentPlugin?  I'd like to develop against whatever is the most current way of doing things but all the examples in my VM installation derive from vmPSPlugin. 

I'm also having basic issues with the language file for my plugin. After I install my plugin (successfully without error/warnings), my BE configuration does not show the translated language strings. If I put the contents of my .ini file in some other installed plugin's .ini file, the text appears correctly on the BE.

Overall, I'm having trouble with very simple/basic things.  If there's an existing plugin example that basically does nothing but is a baseline starting point or code template, would someone please point me to that?

Thank you,
Andrea
Title: Re: vmpayment plugin class - derive from vmPaymentPlugin or vmPSPlugin?
Post by: GJC Web Design on August 08, 2016, 01:05:30 AM
afaik the docs are well out of date

definitely  extends vmPSPlugin

I start all my plugins from an existing current ..  authorize is a fairly standard one..

or start with the standard payment plugin but of course it lacks a lot of the external function calls etc

re lang.. normally in the plugin now..

folders : language->en-GB->the ini's

installed by e.g.

<files>
   <filename plugin="xxxxxx">xxxxx.php</filename>
   <folder>language</folder>
    </files>
Title: Re: vmpayment plugin class - derive from vmPaymentPlugin or vmPSPlugin?
Post by: aerdna on August 08, 2016, 05:47:48 AM
Thank you!