No observable events are fired during the Payment processing stage of Magento. Instead, you define a class for whatever gateway you're implementing, and then define methods that Magento will automatically call as an order makes it's way through the various payment methods.
Poke around the base abstract payment class to see the various methods that will be called during payment processing. Define the same methods in your class to hook into the payment process at whatever point you'd like.
File: app/code/core/Mage/Payment/Model/Method/Abstract.php
class abstract class Mage_Payment_Model_Method_Abstract
{
/**
* Authorize
*
* @param Varien_Object $orderPayment
* @return Mage_Payment_Model_Abstract
*/
public function authorize(Varien_Object $payment, $amount)
...
/**
* Capture payment
*
* @param Varien_Object $orderPayment
* @return Mage_Payment_Model_Abstract
*/
public function capture(Varien_Object $payment, $amount)
...
/**
* Void payment
*
* @param Varien_Object $invoicePayment
* @return Mage_Payment_Model_Abstract
*/
public function void(Varien_Object $payment)
...
/**
* Refund money
*
* @param Varien_Object $invoicePayment
* @return Mage_Payment_Model_Abstract
*/
//public function refund(Varien_Object $payment, $amount)
public function refund(Varien_Object $payment, $amount)
...
/**
* Cancel payment (GoogleCheckout)
*
* @param Varien_Object $invoicePayment
* @return Mage_Payment_Model_Abstract
*/
public function cancel(Varien_Object $payment)
...
I don't do a lot of Payment Gateway implementations, but I'm guessing that refund
is the method you want for credit memos, and capture
is the one for invoices. It looks like the cancel
method is something specific to Google Checkout. Define all five in your class with some logging functions and walk though some fake orders on your development system if you want to know for sure.