-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Switch to passing payment_processor_id as input param to completeOrder #18528
Switch to passing payment_processor_id as input param to completeOrder #18528
Conversation
(Standard links)
|
Ok I agree with this - I just need to check a bit more carefully. |
Test fails look related CRM_Contact_BAO_QueryTest.testGetSummaryQueryWithFinancialACLDisabled |
@@ -353,6 +353,8 @@ public function main() { | |||
return; | |||
} | |||
|
|||
$input['payment_processor_id'] = $paymentProcessorID; | |||
|
|||
self::$_paymentProcessor = &$objects['paymentProcessor']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can go too & we can stop passing $paymentProcessorID into validateData a few lines earlier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton I'm less familiar with the IPN code here - do you want to do a separate PR for just those changes you are suggesting and I'll review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mattwire ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All test failures are triggering |
@mattwire I think it's an optional parameter so it could be Because it could be cheque or whatever |
@mattwire I guess we should check though that where completetransaction is called in core it does pass in payment_processor_id rather than rely on guess work |
d279dd9
to
dc65872
Compare
@eileenmcnaughton Tests now passing. |
Yep - that should work! I'll put up PRs to further remove from the IPN classes |
Overview
This stops using $objects['paymentProcessor'] and passes the payment_processor_id via
$input
instead. Further cleanup is required to remove the call to loadRelatedObjects altogether.Before
loadRelatedObjects required to set
$objects['paymentProcessor']
After
loadRelatedObjects not required to set
$objects['paymentProcessor']
.$input['payment_processor_id']
contains the payment processor ID that is required.Technical Details
Comments
@eileenmcnaughton replacement for #18518