I have developed a credit card payment plugin for payments with Budapest Bank (GE Money) for use with VM 2.0 . I started from the paypal plugin, simplified and incorporated the bank's requirements.
It appears to work ok - the bank has even tested it - as far as returning to the correct url page depending on failure or success, and changing the order status (for example to cancelled if payment failure)
But one thing I cannot solve is to get the cart emptied - no errors even at maximum reporting level - but no cart emptying either.
My latest (not working) attempt is to add to function plgVmOnPaymentNotification():
$cart = VirtueMartCart::getCart();
$cart->emptyCart();
Even help with debugging would assist ... putting print_r() or dump() inside the plugin doesnt help!
I am sure that the code is being reached because it is just before the code to change the order status and set the return url (which work) :) but still no result :-\
(the paypal plugin is more complex than mine in that it empties the cart based on the session id and order number - I have tried a version of this too but without success)