We are using Magento EE 1.13.0.2 with the PayPal Website Payments Standard payment method. Unfortunately it's not possible to set an order status for paid PayPal orders in the back-end.
We need to set a custom order status when the order has been paid successfully (and not partial). Tutorials to modify the PayPal order status seem to be outdated, wrong or ugly hacks.
From what I gathered:
- the payment updates would be handled by PayPal IPN.
- There is a method
Mage_Paypal_Model_Ipn::_registerPaymentCapture()
responsible for "Process completed payment (either full or partial)". - In
Mage_Paypal_Model_Ipn::_registerTransaction()
the request from PayPal is analysed and the payment status is compared toMage_Paypal_Model_Info::PAYMENTSTATUS_COMPLETED
.
To be honest I'm not sure what to do with this information. I may rewrite Mage_Paypal_Model_Ipn::_registerTransaction()
and just add my code:
// paid
case Mage_Paypal_Model_Info::PAYMENTSTATUS_COMPLETED:
$this->_registerPaymentCapture(true);
// my code here
break;
Of course an event observer (e.g. for one of the order or order state events) would be much nicer but I'm not sure if there is a 100% reliable way to catch that one-time event when the order gets paid completely via PayPal.
Any ideas?
Update
We chose to modify our order status flow and don't need to modify the status anymore. I'll leave the question open for some time in case somebody wants to answer it.