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] Provide standardised methods to get recurring contribution id & object #20294

Merged
merged 1 commit into from
May 16, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented May 14, 2021

Overview

[REF] Provide standardised methods to get recurring contribution id & object

Before

values passed around

After

reliable methods to retrieve them that work for both paypal pro and paypal express

Technical Details

This adds methods to get the recurring contribution id & object that work from the paypal
express and from the paypal pro flows. In the paypal express flow it is
retrieved from a known value (and this flow is only ever hit for recurrings
as evidenced by the existing getsingle) and then set on the class. For paypal pro
it is optional and will be in the cheap-to-access POST array if relevant

Comments

tests in
CRM_Core_Payment_PayPalProIPNTest

@civibot
Copy link

civibot bot commented May 14, 2021

(Standard links)

@civibot civibot bot added the master label May 14, 2021
@@ -611,16 +644,6 @@ public function handlePaymentExpress() {
throw new CRM_Core_Exception('Failure: Could not find contribution record for ' . (int) $contribution->id, NULL, ['context' => "Could not find contribution record: {$contribution->id} in IPN request: " . print_r($input, TRUE)]);
}

if (!empty($ids['contributionRecur'])) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this object is actually not used... it is a sort of validation that has been copied & pasted - but the getsingle above already does this validation

… object

This adds methods to get the recurring contribution id & object that work from the paypal
express and from the paypal pro flows. In the paypal express flow it is
retrieved from a known value (and this flow is only ever hit for recurrings
as evidenced by the existing getsingle) and then set on the class. For paypal pro
it is optional and will be in the cheap-to-access POST array if relevant
@mattwire mattwire merged commit 5d33fdd into civicrm:master May 16, 2021
@eileenmcnaughton eileenmcnaughton deleted the ppp branch May 17, 2021 01:43
eileenmcnaughton added a commit to eileenmcnaughton/civicrm-core that referenced this pull request May 17, 2021
…sed param

This is a follow up to civicrm#20294
- getContributionRecurID now always has the id so we don't need to pass it around
in the ids array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants