PayPal will send us the new email, somewhere... Find it and import into Civi as their new primary email.
Description
Related Objects
Event Timeline
Could do this with the subscr_id, or we could start storing processor-side persistent payer ids with the contact record
Can you describe the process here? ie. is this a case of someone logging into their paypal account & changing the address & paypal sends us a notification of some sort?
I think PayPal will just include the updated donor details in the next subscr_payment message
I think the code maybe does that. It was probably creating a duplicate address rather than updating but the test for T15247 suggests that is happening? Ah no, it only happens if there is a contribution_tracking record for the contribution. So, we could probably remove that IF & it would happen every transaction
Note that the relevant code is the IF clause here - without this if wrapper clause the address would update
*/
if ( $msg[ 'contribution_tracking_update' ] ) {
// TODO: this scenario should be handled by the wmf_civicrm_contribution_message_import function.
// Map the tracking record to the CiviCRM contribution
wmf_civicrm_message_update_contribution_tracking( $msg, $contribution );
// update the contact
$contact = wmf_civicrm_message_contact_update( $msg, $recur_record->contact_id );
// Insert the location record
wmf_civicrm_message_location_update( $msg, $contact );
// Tag contact for review
wmf_civicrm_tag_contact_for_review( $contact );
}The instruction to not update (fail the above if) comes from
if ( $msg[ 'txn_type' ] == 'subscr_payment' ) {
// default to not update contribution tracking data
$msg_normalized[ 'contribution_tracking_update' ] = false;
// get the database connection to the tracking table
$dbs = wmf_civicrm_get_dbs();
$dbs->push( 'donations' );
$query = "SELECT * FROM {contribution_tracking} WHERE id = :id";
$tracking_data = db_query( $query, array( ':id' => $msg[ 'custom' ] ) )->fetchAssoc();
if ( $tracking_data ) {So the question for this ticket is 'why would we not remove the contribution_tracking_update logic and always update the address based on the paypal notification. (& if the answer is still dunno after some more thought then some code can be removed :-)
Oldie but goodie as we just talked about this in T353376: Email pref centre - Solve email overwrite issue from recurring