Skip to content

feat: Ensure one-time Paypal donations recorded in CiviCRM use same transaction ID as Paypal does

stephen requested to merge more-useful-paypal-ids-in-civi into main

Historically, when donate-neo has pulled apart webhook messages to construct Resque data for CiviCRM, when handling one-time Paypal donations, it has taken the transaction ID from the aggressively-nested event["resource"]["supplementary_data"]["related_ids"]["order_id"].

It was recently pointed out that Paypal itself uses a different ID to refer to those donations. Folks on the finance-related teams who need to compare CiviCRM donations to Paypal's records of same would prefer that the IDs in CiviCRM match the IDs shown to them by Paypal. This ID is located on relevant webhook messages at the more-convenient event["resource"]["id"].

No downstream process cares what this ID is set to, but the humans which need to search for these transactions do! Therefore, this MR seeks to fulfill that request straightforwardly, by swapping the first ID with the second.

Fixes #156 (closed).

Merge request reports

Loading