Notes by JDeveloper for JDeveloper
Once you master it, you're gonna like it

Joomla Mastery's Virtuemart Payment Plugin Reference

Written by Viktor Iwan

This is the list and objective of standard virtuemart 2 payment plugin. This note is always "on going process", it  is not the official virtuemart 2 plugin and might be changed in the future.

Read more

Virtuemart Plugin : Custom Pluginname

Written by Viktor Iwan

There are times that you (or your client) does not like the way  virtuemart display the payment name, because by default it's a combination between Payment Name and Payment Description:

So how to modify that ?

Read more

Handling IPN

Written by Viktor Iwan

There are 3 functions you are going to have to modify for IPN in Virtuemart 2

plgVmConfirmedOrder
This is the function responsible for redirecting to the CC info page.
You will need to create a html form with all the required Linkpoint data (product info, price info, user info), set the action url to the Linkpoint CC page and submit the form using javascript (use the paypal and/or payzen payment plugins as reference)

If the Linkpoint api allows you to send the the return url (page the user is redirected to after payment) and notify url (page the payment getaway ALWAYS calls after payment. Not all payment gateways supports this)  as part of the form data. The return url should be set to

http://mysite.com/index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&pm=[paymentid]

and the notify url should be set to

http://mysite.com/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component&pm=[paymentid]

Replace [paymentid] with the plugin's  id. It should be checked by both plgVmOnPaymentResponseReceived() and plgVmOnPaymentNotification() (see below) to see if it should process the payment


plgVmOnPaymentResponseReceived
It processes the Linkpoint response displays the status of the transaction to the user.

plgVmOnPaymentNotification
It processes the Linkpoint response data updates the order status. If Linkpoint does not support this, then your plgVmOnPaymentResponseReceived() function should update the order status

Resource: http://forum.virtuemart.net/index.php?topic=110280.msg371203;topicseen#msg371203


Payment Plugin : $method - all information lies here

Written by Viktor Iwan

When you learn to build Payment plugin from existing/default payment plugin (like standard, paypal) you will see a lot of $method object being use, and $method properties between each plugin is different, so what really inside $method object ?

Read more