Page MenuHomePhabricator

Failmail alert paypal_audit
Closed, ResolvedPublic

Description

file_path: /var/spool/audit/paypal-frup/incoming/TRR-20260904.01.011.CSV
file_name: TRR-20260904.01.011.CSV
message: Something went amiss with the recon parser while processing /var/spool/audit/paypal-frup/incoming/TRR-20260904.01.011.CSV: "We expect these to always be debits - ie payouts"
code: RECON_PARSE_ERROR
subject: paypal_audit

The withdrawal row throwing the error has Transaction Debit or Credit=CR instead of DR as expected in our code. CR is expected to be the value in column Fee Debit or Credit instead.

"Transaction Event Code","Transaction Debit or Credit","Fee Debit or Credit"
"T1300","CR",""

Details

Related Objects

Event Timeline

This is being caused by an incoming transaction with type T0000 from CID

T000 translates to 'General Payment' - https://developer.paypal.com/reports/reference/t-codes

We have only seen these as payouts to us before - possibly the presence of a consumer ID is meaningful?

  • it does not appear to have made it to CiviCRM

This is how it looks in the file

FieldValue
CHSB
Transaction ID6WE406841H3050743
Invoice ID
PayPal Reference ID
PayPal Reference ID Type
Transaction Event CodeT0000
Transaction Initiation Date2026/09/04 08:55:09 -0700
Transaction Completion Date2026/09/04 08:55:09 -0700
Transaction Debit or CreditCR
Gross Transaction Amount1040
Gross Transaction CurrencyUSD
Fee Debit or CreditDR
Fee Amount31
Fee CurrencyUSD
Custom Field
Consumer IDXLH85GERDAL34
Payment Tracking ID
Store ID
Bank Reference ID

We are explicitly throwing an exception as we don't know what to do with these and it seems like if we let it bubble up from the audit it might be hard to figure out how to make a donation from it.

So I don't know how this happened - if it's a one-off we also need some clear way to recover - which possibly means letting the donation through the audit so the file at least completes - but it would still require some manual intervention because it's soooo oddball

./logdog.sh -d 202609 6WE406841H3050743 found nothing ....

@Eileenmcnaughton Do you have access to PayPal? I don't, so I cannot see the transaction nor the consumer in the account. I'm asking because based on my research I believe this happens when the user donated directly to us using PayPal's UI / interface. Basically this PayPal consumer might have clicked on a button in PayPal like a "Send Money" feature to an email address or mobile number, rather than paying through an integrated checkout system.

Is there a way to verify this assumption from the account? If so, couldn't we maybe change some settings in the PayPal's buisness account so that all payments are categorized differently? I read somewhere that we could maybe achieve that using Donations / PayPal Buttons -> Donate. But not having access, I cannot validate.

Sign - no I failed to log in I thought I got into paypal once - maybe I imagined it - @Cstone or @Ejegg ?

I searched in the PayPal console at https://www.paypal.com/mep/unifiedtransactions for the transaction ID and didn't find anything either. I looked around for other data saw 'disbursement report' available so I'm generating one for 9/4 to see if that has any more information.

Searching in the FRUP account I did find it - seems to be an unsolicited donation. Looks like ppl can send us money just by searching for 'Wikimedia Foundation' directly in their 'Send Money' screen, so we're guessing that's how they did it. The TRR file has more complete donor information.

@Ejegg got in to analyse how this happened

image.png (1,373×206 px, 86 KB)

And proposed approach

image.png (1,381×396 px, 145 KB)

Change #1341691 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/SmashPig@master] Treat unsolicited payment as a donation

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

Change #1341691 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Treat unsolicited payment as a donation

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

Fix has been deployed, and the file is now clearing

XenoRyet set Final Story Points to 2.
XenoRyet changed Final Story Points from 2 to 4.