Mwalker has uploaded a new change for review.

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

Change subject: Put email into MerchantReference2
......................................................................

Put email into MerchantReference2

PaymentTrust cannot search by email, but it can search by
MerchantReference2 (a 60 char field that we aren't using
elsewhere.)

The caveat currently is that PT doesn't allow you to search
an email address in MR2 (it thinks the @ is invalid.)

Another potential problem is that '+' is rejected by PT so
we'll have to clear that out somehow.

And... I lcase'd the email address to make it easier to search
by.

Change-Id: I9849ae778ddf40ad2103c4445a63d3032a2c7b47
---
M gateway_common/DonationData.php
M worldpay_gateway/worldpay.adapter.php
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/02/138502/1

diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index c1d4f67..a225f1b 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -712,7 +712,7 @@
                        $email = 'nob...@wikimedia.org';
                }
 
-               $this->setVal( 'email', $email );
+               $this->setVal( 'email', strtolower( $email ) );
                $this->expunge( 'emailAdd' );
        }
 
diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 5094f4f..9d1c973 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -386,6 +386,7 @@
                                'ZipCode',
                                'CountryCode',
                                'Email',
+                               'MerchantReference2',
 
                                'CVN'
                        ),
@@ -438,6 +439,7 @@
                                'ZipCode',
                                'CountryCode',
                                'Email',
+                               'MerchantReference2',
                        ),
                        'values' => array(
                                'VersionUsed' => 6,
@@ -699,7 +701,8 @@
                        'PTTID'             => 'wp_pttid',
                        'UserName'          => 'username',
                        'UserPassword'      => 'user_password',
-                       'MerchantId'        => 'wp_merchant_id'
+                       'MerchantId'        => 'wp_merchant_id',
+                       'MerchantReference2'=> 'email',
                );
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9849ae778ddf40ad2103c4445a63d3032a2c7b47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker <mwal...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to