Awight has uploaded a new change for review.

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

Change subject: reject some address_names
......................................................................

reject some address_names

If someone's business name is set to their name it looks weird in civi

Bug: T152510
Change-Id: Icedbdab8dd518e7e67016dd2d2b9755b8ce5c27b
---
M PaymentProviders/PayPal/Job.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/05/325705/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index f253e0d..9f949c7 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -98,6 +98,15 @@
                                }
                        }
 
+                       // If someone's PayPal account is set to their name we 
don't want
+                       // it to go in the address box. They should put in a 
business name
+                       // or something.
+                       if ( isset( $new_msg->supplemental_address_1 )
+                               && $new_msg->supplemental_address_1 ===
+                               "{$new_msg->first_name} {$new_msg->last_name}" 
) {
+                               unset( $new_msg->supplemental_address_1 );
+                       }
+
                        // FIXME once recurring uses normalized msg it needs 
this too
                        $new_msg->date = strtotime( $new_msg->date );
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/325705
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icedbdab8dd518e7e67016dd2d2b9755b8ce5c27b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to