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

dev/financial#152 simplify interaction with membership, deprecate function #18735

Merged
merged 1 commit into from
Oct 12, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Minor code simplification in tested code

Before

$ids['membership'] is only used in one specific place in the IPN but it is determined early on & passed around

After

$ids['membership'] only determined where it is used.

Switch to calling sendRecurringStartOrEndNotification directly as the wrapper function only interprets $ids['membership'] into a bool for $autoRenewMembership and duplicates the IF

Technical Details

ids['membership'] is only calculated in the Authorize.net IPN flow for the purpose of determining
the autoRenew membership parameter for recurringNotify. This is currently passed to sendRecurringStartOrEndNotification
but that does not add any simplification & cannot be used elsewhere - so deprecating.

Comments

This is tested in testIPNPaymentMembershipRecurSuccessNoLeakage

…ction

ids['membership'] is only calculated in the Authorize.net IPN flow for the purpose of determining
the autoRenew membership parameter for recurringNotify. This is currently passed to sendRecurringStartOrEndNotification
but that does not add any simplification & cannot be used elsewhere - so deprecating.

This is tested in testIPNPaymentMembershipRecurSuccessNoLeakage
@civibot
Copy link

civibot bot commented Oct 11, 2020

(Standard links)

@civibot civibot bot added the master label Oct 11, 2020
@mattwire mattwire merged commit 6ba1f01 into civicrm:master Oct 12, 2020
@seamuslee001 seamuslee001 deleted the aipn branch October 12, 2020 20:19
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