svn commit: r577496 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r577496 - /ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java

jaz-3
Author: jaz
Date: Wed Sep 19 18:42:00 2007
New Revision: 577496

URL: http://svn.apache.org/viewvc?rev=577496&view=rev
Log:
added checks to prevent NPE when results are not sent for AVS and CVV2

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java?rev=577496&r1=577495&r2=577496&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java Wed Sep 19 18:42:00 2007
@@ -369,7 +369,7 @@
                 String addAvs = (String) parameters.get("AVSADDR");
                 String zipAvs = (String) parameters.get("AVSZIP");
                 avsCode = addAvs + zipAvs;
-                if ("N".equals(addAvs) || "N".equals(zipAvs)) {
+                if (addAvs == null || "N".equals(addAvs) || zipAvs == null || "N".equals(zipAvs)) {
                     avsCheckOkay = false;
                 }
             }
@@ -382,7 +382,7 @@
             boolean checkCvv2 = UtilProperties.propertyValueEqualsIgnoreCase(resource, "payment.verisign.checkAvs", "Y");
             if (checkCvv2 && !isSale) {
                 cvvCode = (String) parameters.get("CVV2MATCH");
-                if ("N".equals(cvvCode)) {
+                if (cvvCode == null || "N".equals(cvvCode)) {
                     cvv2CheckOkay = false;
                 }
             }