Author: ashish
Date: Tue Mar 2 12:01:28 2010
New Revision: 917986
URL:
http://svn.apache.org/viewvc?rev=917986&view=revLog:
Applied patch from jira issue : OFBIZ-3528 - In payflowpro sending STREET in parameters from billing address fails if it contains special characters.
In payflowpro sending STREET from billing address fails if it has special charaters like "&" and "=". These need to be send with lenght tag. For more details see the sections 'Using Special Characters in
1. Values' and 'PARMLIST Syntax Guidelines' in the PayPal Payflow
2. Pro Developer's Guide
Along with this fix also add address1 to street as it is missing from the code.
Thanks Pranay for the contribution.
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=917986&r1=917985&r2=917986&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 Tue Mar 2 12:01:28 2010
@@ -144,9 +144,8 @@
// gather the address info
if (ps != null) {
- String street = ps.getString(UtilValidate.isNotEmpty(ps.getString("address2")) ? " " + ps.getString("address2") : "");
-
- data.put("STREET", street);
+ String street = ps.getString("address1") + ((UtilValidate.isNotEmpty(ps.getString("address2"))) ? " " + ps.getString("address2") : "");
+ data.put("STREET"+"["+street.length()+"]", street);
data.put("ZIP", ps.getString("postalCode"));
}
}