Page MenuHomePhabricator

CIDs with PayPal cancel date of 1969-12-31 need canceling on Paypals end
Closed, ResolvedPublic

Description

The CIDs from this search kit: https://civicrm.wikimedia.org/civicrm/admin/search#/edit/3078 contain a buggy cancel date as explained in this phab: T373162: Already cancelled Paypal cancel dates at 1969-12-31 - need to update to actual cancel date
After checking a handful of CIDs individually I noticed that the same CIDs with a missing date under the 'recurring contribution end date' from the search-kit results still have active PayPal recurring donations with the failed payment notice at Paypal.
Here are a few examples: CID 47286605, 1130325, 1127714, 53185951, 37492197, 8155718, 438778...
Could a script be created to cancel the PayPal recurring donations from the search kit results, specifically targeting those with a 'cancel date' of 12-31-1969 and without an actual 'recurring contribution end date'?

cstone: I updated the title to add these need cancelling at paypals end. We added this feature with our cancel bot recently but it wouldn't have cancelled ones that had already been cancelled in civi T341346: Job that sets PayPal recurs as cancelled after 90 days w/no donation should also cancel at PayPal

Event Timeline

Cstone renamed this task from CIDs with PayPal cancel date of 1969-12-31 need canceling! to CIDs with PayPal cancel date of 1969-12-31 need canceling on Paypals end.Sep 5 2024, 11:46 PM
Cstone updated the task description. (Show Details)
XenoRyet triaged this task as Medium priority.Sep 30 2024, 8:14 PM

OK, I've got a list of auto-cancelled donations with bad cancel dates

select trxn_id from civicrm_contribution_recur where cancel_reason='Automatically cancelled for inactivity' and cancel_date='1969-12-31 16:00:00'

There are 3,371 of them in a file ready to be batch cancelled on PayPal's end.
@AMJohnson / @SHust / @krobinson please let me know if you want me to wait for any reason, or if I should just go ahead.

@Ejegg thanks for the nudge! The cancellation date will only be reflected/affect the 1969 dates correct? If so there's no need to wait for anything.

@SHust when I run the script, these 3,371 which have a cancel_date of 1969 in Civi and haven't had a donation in at least 3 months, will also be cancelled at the PayPal side. Right now they're in a zombie state at PayPal, just sending us failure notifications month after month.

@Ejegg -- The one question I have is typically when donations are cancelled at PayPal an email is sent from PayPal letting them know of the cancellation. Will these 3,371 donors receive an email from PayPal notifying them of this cancellation? I ask as it'd be good to keep in mind as we may see an influx of tickets with questions if so.

Hi @AMJohnson. I just made and cancelled a recurring of my own and I did indeed get an email:

Wikimedia Foundation, Inc. canceled your automatic payments
Wikimedia Foundation, Inc. canceled your automatic payments. This means we'll no longer automatically draw money from your account to pay the merchant. If you have any questions, you may ask Wikimedia Foundation, Inc. about this cancellation.

I looked at the documentation for the cancel API call and couldn't find any way to suppress the notification. However, there is a field for a note that will be included in the cancellation notification that PayPal sends out. Do you want to just leave them in their zombie state, or add a note?

@Ejegg Here’s a message that should help prevent confusion among donors, especially since some from the 1969 list have active PayPal recurring donations:

Please note that the canceled recurring donation was inactive, usually due to a PayPal account issue. We have not canceled any active recurring donations. If you have questions, feel free to email donate@wikimedia.org. To create a new recurring donation, please visit donate.wikimedia.org.

If space is limited, please feel free to drop the 'To create a new recurring donation, please visit donate.wikimedia.org.' paragraph as we're aiming to avoid donor confusion.

Can you please let us know when the cancellations happen so I can let the team know? Thank you for all your help!

Change #1082320 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/SmashPig@master] Allow sending a note along with a cancellation

https://gerrit.wikimedia.org/r/1082320

Hi @SHust they seem to have a really small amount of space available for the note - I was only able to get this much in:

Please note that the canceled recurring donation was inactive, usually due to a PayPal account issue.

How is that?

The limit for the note seems to be 128 characters

What about this (103 characters): Please note that the canceled recurring donation was inactive; no active recurring donations have been canceled.

Change #1082320 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Allow sending a note along with a cancellation

https://gerrit.wikimedia.org/r/1082320

OK @SHust, the script has been run and they are all canceled at PayPal's end with that note (except for 15 which had been cancelled on PayPal's end in the week since I pulled the IDs).

XenoRyet set Final Story Points to 4.