Separate repeattransaction from completeorder function - only call the latter from payment.create
The goal is that
-
the
repeattransaction
api callsBAO_Contribution:repeatTransaction
without going through thecompleteOrder
function.contribution_status_id
is always pending. However, at the api level it can take another action after repeattransation is called (eitherContribution::update->setValues('Failed')
orPayment.create
-
the
completetransaction
api will calculate the missing payment amount and callpayment.create
-
payment.create
will call thecompleteOrder
function directly (not via the api, since that will be callingpayment.create
and it will be the only place calling completeOrder directly
There are quite a few cleanup steps / ensuring tests are present to get there & as a 'chipping away' thing I don't think enumerating them all here works.
At the moment I'm working to get rid of the calls to completeOrder
from the Authorize.net & Paypal ipn classes - in particular the one that should be calling repeattransaction
so that the completeOrder
is only called for the purposes of repeating a transaction from one place in the code