Skip to content
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] Stop instantiating transaction in PaypalIPN #18020

Merged
merged 1 commit into from
Aug 1, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Aug 1, 2020

Overview

Don't istantiate pointless transactionn

Before

Transaction instantiated & passed around - but adds no real value

After

Not instantiated, except in completeOrder where it is done in the right place (in the BAO function)

Technical Details

I can do similar for PaypalProIPN & Anet IPN

Comments

@civibot
Copy link

civibot bot commented Aug 1, 2020

(Standard links)

@civibot civibot bot added the master label Aug 1, 2020
@@ -214,7 +214,7 @@ public function loadObjects($input, &$ids, &$objects, $required, $paymentProcess
* @return bool
* @throws \CiviCRM_API3_Exception
*/
public function failed(&$objects, &$transaction, $input = []) {
public function failed(&$objects, $transaction = NULL, $input = []) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could instantiate a transaction within this function - but I think in the case of a crash not updating the contribution to failed would likely be worse than a partial update

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 so this would then mean I do this on the other classes & then #18016 - we could have a transaction within cancelled / failed. I'm not convinced - but I'm not opposed either

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 this is the alternative approach #18022

@seamuslee001
Copy link
Contributor

This makes sense to me

@seamuslee001
Copy link
Contributor

Test fail looks to be unrelated to me merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants