From: erickson Date: Fri, 11 Mar 2011 21:51:40 +0000 (+0000) Subject: only append street2 to CC payment address if no address is provided by the caller X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8725884f4603f136841f2b33edc9b64f9c950654;p=working%2FEvergreen.git only append street2 to CC payment address if no address is provided by the caller git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@19713 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CreditCard.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CreditCard.pm index 6de616307c..57abc87b77 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CreditCard.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CreditCard.pm @@ -201,9 +201,11 @@ sub prepare_bop_content { # Especially for the following fields, do we need to support different # mapping of fields for different payment processors, particularly ones # in other countries? - $content{address} ||= $patron->mailing_address->street1; - $content{address} .= ", " . $patron->mailing_address->street2 - if $patron->mailing_address->street2; + if(!$content{address}) { + $content{address} = $patron->mailing_address->street1; + $content{address} .= ", " . $patron->mailing_address->street2 + if $patron->mailing_address->street2; + } $content{city} ||= $patron->mailing_address->city; $content{state} ||= $patron->mailing_address->state;