-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REF Deprecate API3 _ipn_process_transaction() #22488
REF Deprecate API3 _ipn_process_transaction() #22488
Conversation
(Standard links)
|
Thanks, @mattwire Tracking at https://lab.civicrm.org/extensions/gocardless/-/issues/127 |
Marked as "ok-without-test" because this is well tested code and we are not changing anything - just duplicating code. |
Just flagging that I've not considered what this means for GC. There must have been a reason I reached for that code, and needed to avoid the api calls that also include it. I just need to spend some time on this and haven't got that time at the mo. |
@artfulrobot per your comment in the code:
Which is almost certainly because I should note that deprecating does not mean removing as yet! We'd normally wait about six months before actually removing the function and I'm proposing that you simply make a copy of it in the GoCardless code until you are ready to update/clean it up. |
I haven't r-run'd and usually stay away from this area but
Jenkins retest this please. |
Thanks @demeritcowboy |
Yep agree - that function was definitely never supported to be called from outside of core but since you identified a place calling it then deprecation = better than removal. The repeatransaction function is still called within completeOrder but is ALMOST completely separated from the rest of the function (if it only supported 'Pending' as status it would return) |
Overview
The
_ipn_process_transaction()
function is a wrapper method called by both API3completetransaction
andrepeattransaction
before callingcompleteOrder()
. We would like to stop callingcompleteOrder()
at all forrepeattransaction
and deprecatecompletetransaction
in favour of calling API3Payment.create
._ipn_process_transaction()
is basically just manipulating parameters before passing along tocompleteOrder()
. This duplicates the contents of that function and puts it directly in the calling API. This allows us to deprecate_ipn_process_transaction()
and work towards simplification of therepeattransaction
/completetransaction
API functions.Before
Both API calls use
_ipn_process_transaction()
.After
CiviCRM core does not use
_ipn_process_transaction()
. @artfulrobot GoCardless is currently calling this function directly and when this PR is merged you'll see deprecation notices so that will need fixing at some point (perhaps copy the contents of the function initially?).Technical Details
Explained above.
Comments