jenkins-bot has submitted this change and it was merged.

Change subject: Just send IsCVNMEM with every request
......................................................................


Just send IsCVNMEM with every request

Change-Id: I82944e4f506a5f0b075fe0814a809e82f53920ce
---
M worldpay_gateway/worldpay.adapter.php
1 file changed, 7 insertions(+), 12 deletions(-)

Approvals:
  Awight: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/worldpay_gateway/worldpay.adapter.php 
b/worldpay_gateway/worldpay.adapter.php
index 0e7703c..d75a06e 100644
--- a/worldpay_gateway/worldpay.adapter.php
+++ b/worldpay_gateway/worldpay.adapter.php
@@ -840,15 +840,19 @@
 
                $this->loadRoutingInfo( $transaction );
 
+               if ( $this->isESOP() ) {
+                       // This needs to go in every ESOP request because 
otherwise
+                       // they return "Transaction NOT Authorized"
+                       $this->transactions[$transaction]['request'][] = 
'IsCVNMEM';
+                       $this->transactions[$transaction]['values']['IsCVNMEM'] 
= 1;
+               }
+
                switch ( $transaction ) {
                        case 'GenerateToken':
                                if ( $this->isESOP() ) {
                                        // This parameter will cause WP to use 
the iframe code path.
                                        
$this->transactions[$transaction]['request'][] = 'IsHosted';
                                        
$this->transactions[$transaction]['values']['IsHosted'] = 1;
-                                       // Tell WP we want that CVV field.
-                                       
$this->transactions[$transaction]['request'][] = 'IsCVNMEM';
-                                       
$this->transactions[$transaction]['values']['IsCVNMEM'] = 1;
                                        // Translate the iframe to our language.
                                        
$this->transactions[$transaction]['request'][] = 'LAN';
                                }
@@ -869,15 +873,6 @@
                                break;
 
                        case 'AuthorizePaymentForFraud':
-                               if ( $this->isESOP() ) {
-                                       // WP said we should send this here.
-                                       
$this->transactions[$transaction]['request'][] = 'IsCVNMEM';
-                                       
$this->transactions[$transaction]['values']['IsCVNMEM'] = 1;
-                               } else {
-                                       // Perform CVV and AVS verification for 
account (deposit not allowed)
-                                       
$this->transactions[$transaction]['request'][] = 'IsVerify';
-                                       
$this->transactions[$transaction]['values']['IsVerify'] = 1;
-                               }
                                $this->addRequestData( array( 'cvv' => 
$this->get_cvv() ) );
                                $this->store_cvv_in_session( null ); // Remove 
the CVV from the session
                                return parent::do_transaction( $transaction );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82944e4f506a5f0b075fe0814a809e82f53920ce
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to