Fundraising/Internal-facing/Donor Portal
Overview
The donor portal is a standalone wiki that uses civiproxy to talk to civicrm where can manage donor's donations.
We use vue.js for this extension.
Note that the links below include checksums that will have expired by the time you read this page. To get an updated checksum for a contact, just browse to their contact summary page in your local Civi instance and look for the 'Donor Portal' link on the right side just under the Donor Links block.
Links
URL Structure
https://donorpreferences.wikimedia.org/index.php?title=Special:DonorPortal&contact_id=<id>&checksum=<checksum_can_expired>
Sample links (Local instance)
[Start] ↓ [**Donor** updates for any donation from donor portal] ↓ [**System** sends donor update info to queue] ↓ [Log activity: "recurring update/xxx"] ↓ [**System** consume the donor portal queue to have donation updated]
Phabricator Epic
Documentation of discussion for donor portal
User interface Design (front end in github)
https://gitlab.wikimedia.org/rlopez-wmf/fr-donor-portal-frontend
Main Features includes
- view donations
- convert donation from monthly to annually
- downgrade recurring
- upgrade recurring
- pause recurring
- cancel recurring
Recurring background
https://wikitech.wikimedia.org/wiki/Fundraising/Data_and_flow/Recurring
File paths
- src/donut/extensions/DonationInterface/modules/ext.donationInterface.donorPortal
- Get donor Info from civiproxy
- /src/civi-sites/wmf/ext/wmf-civicrm/Civi/Api4/Action/WMFContact/GetDonorSummary.php
- Update Email Preference with Queue
- /src/civi-sites/wmf/ext/wmf-civicrm/Civi/Api4/Action/WMFContact/UpdateCommunicationsPreferences.php
Queue
same as email preference update to consume donor portal update:
cv api4 --user=admin -vv WMFQueue.Consume timeLimit=280 queueConsumer=EmailPreferences queueName=email-preferences
recurring modify:
cv api4 --user=admin -vv WMFQueue.Consume timeLimit=280 queueConsumer=RecurringModify queueName=recurring-modify
Unit Test
npm run test
Deploying
The email preference center is under the project donorwiki. Deploying is the same steps as deploying Donation Interface and then running fundraising_code_update with the project donorwiki
There is a settings file in localsettings in a folder called civiproxy. This can be deployed to the civiproxy project
Local Troubleshooting
To make CiviProxy work with the local self-signed cert, we mount an edited copy of the civiproxy file proxy.php from the top-level config/civiproxy folder OVER the one found in src/civiproxy/proxy. The file is edited to turn the certificate validation off when making CURL requests. We also mount config.php into that same folder.
If for some reason you see an error one of those file mounts may have failed. This may fix it:
docker-compose restart civiproxy
This will also fix if you see an unsubscribe page instead of the preferences center.
Note that this file mount may fail when using git to check out a different version of the proxy.php file in the civiproxy repo.