News:

Support the VirtueMart project and become a member

Main Menu

Performing partial refunds in payment plugin

Started by likrish, December 04, 2015, 15:45:02 PM

Previous topic - Next topic

likrish

Hi,

I have created an extended Authorize.net payment plugin that also handles stores customer information, credit cards and line items from Virtuemart orders.

One of the key features I am trying to implement is partial refunds. My plugin uses the plgVmOnUpdateOrderPayment function hook to intercept changes made to the order status and perform various tasks. If I change an order status to refunded, I can perform a full refund via the Authorize.net API. However I am unable to get the value of a line item when changing a line item status to refunded and perform a partial refund.

My Question...
The function is working and firing in my payment plugin as expected, however when changing a line item I do not know hot to the line item id and value (only the full order).

Any help greatly appreciated...

GJC Web Design

have you looked at function plgVmOnUpdateSingleItem ($data, $order)

Ouch... just double checked .. is removed now... was last in VM3.0.2..  :(

was in public function updateSingleItem($virtuemart_order_item_id, &$orderdata, $orderUpdate = false)

/*
//       JPluginHelper::importPlugin('vmcustom');
//       $_dispatcher = JDispatcher::getInstance();
//       $_returnValues = $_dispatcher->trigger('plgVmOnUpdateSingleItem',array($table,&$orderdata));
*/

Maybe Max can tell us why it was removed?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation