jenkins-bot has submitted this change and it was merged.
Change subject: Make it easier to find donations by email in AstroPay
......................................................................
Make it easier to find donations by email in AstroPay
We send them a truncated email address as customer id, 'cause that's
what they let us search on in the merchant console. If a donor
includes a spam-tracking subaddress, we should honor that in our
communications, but when donor services gets an email from them and
wants to find their donation in the console, they probably won't
get the subaddress.
Change-Id: If92a0d5843855e2054c8af89723bef4cfea4f057
---
M astropay_gateway/astropay.adapter.php
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Awight: Looks good to me, approved
jenkins-bot: Verified
diff --git a/astropay_gateway/astropay.adapter.php
b/astropay_gateway/astropay.adapter.php
index 53a4c20..2f9438d 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -509,7 +509,10 @@
* characters of the email address for easy lookup
*/
protected function stage_donor_id() {
- $this->staged_data['donor_id'] = substr( $this->getData_Staged(
'email' ), 0, 20 );
+ // We use these to look up donations by email, so strip out the
trailing
+ // spam-tracking sub-address to get the email we'd see
complaints from.
+ $email = preg_replace( '/\+[^@]*/', '', $this->getData_Staged(
'email' ) );
+ $this->staged_data['donor_id'] = substr( $email, 0, 20 );
}
protected function stage_bank_code() {
--
To view, visit https://gerrit.wikimedia.org/r/232578
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If92a0d5843855e2054c8af89723bef4cfea4f057
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits