fix: Revert Paypal webhook handshake_id to former, useful, value
MR !170 (merged) brought the CiviCRM ID of one-time Paypal transactions in line with the way Paypal exposes transaction IDs to the end user, allowing for easier rectification of Paypal transactions. However, this unintentionally caused a regression in behavior; it changed the trxn_id
as intended, but also changed the handshake_id
.
The handshake_id
must always refer to a identifier common to both the webhook message data and the data payload returned by a successful donation. This makes it possible to associate the donation form data with the webhook at all. In other words, its value is contextually important in a way that the trxn_id
itself is usually not.
Before !170 (merged), the specific value of trxn_id
was not important, so it was a straightforward matter to make its value the same as handshake_id
's eventual value. When composing !170 (merged), trxn_id
was changed, but handshake_id
was accidentally kept from remaining the same.
This MR addresses this oversight and reverts handshake_id
's value to its previous source (event["resource"]["supplementary_data"]["related_ids"]["order_id"]
), while ensuring trxn_id
still provides the human-usable value which !170 (merged) intended it to have.