Page MenuHomePhabricator

[WMDE-Fundraising] Update paypal donation status
Closed, ResolvedPublic46 Estimate Story Points


Handle payment notification requests from PayPal for existing donation

POST request (must be validated, HTTP 406 error if other method was used)

Request model parameters:

Values that are being stored for documentation purpose only:

  • paypal_payer_id => payer_id
  • paypal_subscr_id => subscr_id
  • paypal_payer_status => payer_status
  • paypal_address_status => address_status
  • paypal_mc_gross => mc_gross
  • paypal_mc_currency => mc_currency
  • paypal_mc_fee => mc_fee
  • paypal_settle_amount => settle_amount

Values that are being stored for later export:

  • txn_id => ext_payment_id
  • payment_type => ext_payment_type
  • payment_status => ext_payment_status
  • payer_id => ext_payment_account
  • ext_payment_timestamp (generated at runtime)
  • subscr_id => ext_subscr_id

As the first step, the handler must post back the raw POST data (with the additional field cmd=_notify-validate) to the PayPal URL to signal that the request was received (See If posting back was not successful (got no 200 OK back or response content is not VERIFIED), the script has to quit.

Now the script does different things, depending on payment_status (see below).


If we're using the PayPal sandbox, set to Processed, otherwise ignore. Check if the sandbox still does not send Processed, otherwise just ignore.

Completed and Processed

Handle according to donation status. Do nothing except logging for states that don't make sense. Create a new donation record (with data from the old record) when status is "B" (bezahlt) and txn_type is subscr_payment. Process (new) donation.

Handle the status changes outlined in T130190.

The payment processor does not check the utoken, only the token, because payments can come in up to 5 days after creating the donation.

Other status strings

Log and do nothing. In the future we should check with the fundraising team, which states make sense in our context and which are already handled by defaults and Backend Application actions.


Event Timeline

gabriel-wmde renamed this task from [WMDE] Update paypal donation status to [WMDE-Fundraising] Update paypal donation status.Mar 16 2016, 3:45 PM
JeroenDeDauw added a subscriber: JeroenDeDauw.EditedApr 24 2016, 10:45 PM

Perhaps we should split this task up? Now it's 70 points sitting on doing for a long time, with it being unclear which parts are being worked upon and what still needs doing.

@kai.nissen can you provide some update?

This one is almost done. The task of adding a PayPal donation from IPN (without having a donation data set on our side) is covered by T130119. A few ext_* fields are still missing, but that should be done by today. so we can finally close this one.

kai.nissen closed this task as Resolved.Apr 25 2016, 3:54 PM
gabriel-wmde changed the point value for this task from 55 to 48.May 13 2016, 1:57 PM
Restricted Application added a project: WMDE-FUN-Team. · View Herald TranscriptApr 7 2017, 11:25 AM