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

NFC code cleanup for AuthNet, Paypal, PaypalPro IPNs #12386

Merged
merged 1 commit into from
Jul 2, 2018

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Jul 1, 2018

Overview

This cleans up the code for AuthNet, Paypal and PaypalPro IPNS but does not make any functional changes. A follow-up PR (#12387) builds on this and fixes recurring IPNs for PayPal.

Before

  • Hardcoded contribution_status IDs.
  • Generic error messages with no context.

After

  • contribution_status IDs all use pseudoconstants so IPNs will not break if contribution_status option group is different.
  • Error messages specify what type of IPN and provide context (eg. transaction ID) to make debugging much easier.

@civibot
Copy link

civibot bot commented Jul 1, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor

@mattwire I looked through these changes and they seem good and I think test coverage is adequate here.

My own issue is the vision with handling 'log' - I see a change to

Civi::log()->debug('PayPalProIPN: Could not find txn_type in input request.');

My understanding is that this is pseudonym for the existing function.

However, elsewhere we use this

$log = new CRM_Utils_SystemLogger();
$log->alert('payment_notification processor_name=PayPal', $_REQUEST);

to log to the system_log table. I wonder if we should be using the system log table throughout?

This comment is non blocking & we should discuss with Tim if we want to change

@eileenmcnaughton eileenmcnaughton merged commit 6936f14 into civicrm:master Jul 2, 2018
@mattwire mattwire deleted the IPN_NFC branch September 25, 2018 11:00
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.

3 participants