svn commit: r1001098 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml script/org/ofbiz/accounting/payment/PaymentMapProcs.xml

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

svn commit: r1001098 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml script/org/ofbiz/accounting/payment/PaymentMapProcs.xml

jleroux@apache.org
Author: jleroux
Date: Fri Sep 24 22:36:11 2010
New Revision: 1001098

URL: http://svn.apache.org/viewvc?rev=1001098&view=rev
Log:
A patch from Sascha Rodekamp "Accounting Map Proc - CreditCard Validation" (https://issues.apache.org/jira/browse/OFBIZ-3956) - OFBIZ-3956

A small improvement in the Accounting payment map procs.
The Credit card number was only checked if it is empty. After the patch the map proc checks if it is a valid credit card number.

Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=1001098&r1=1001097&r2=1001098&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Fri Sep 24 22:36:11 2010
@@ -108,6 +108,10 @@
         <value xml:lang="en">Account Transaction Id</value>
         <value xml:lang="hi_IN">लेखा गतिविधि क्रमांक</value>
     </property>
+    <property key="AccountingCardNumberIncorrect">
+        <value xml:lang="de">Kartennummer fehlerhaft</value>
+        <value xml:lang="en">Card Number is erroneous</value>
+    </property>
     <property key="AccountingAccountType">
         <value xml:lang="ar">نوع الحساب</value>
         <value xml:lang="cs">Typ účtu</value>

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml?rev=1001098&r1=1001097&r2=1001098&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentMapProcs.xml Fri Sep 24 22:36:11 2010
@@ -39,7 +39,15 @@ under the License.
     <process field="lastNameOnCard"><copy/><not-empty><fail-property resource="AccountingUiLabels" property="AccountingLastNameOnCardMissing"/></not-empty></process>
     <process field="suffixOnCard"><copy/></process>
     <process field="cardType"><copy/><not-empty><fail-property resource="AccountingUiLabels" property="AccountingCardTypeMissing"/></not-empty></process>
-    <process field="cardNumber"><copy/><not-empty><fail-property resource="AccountingUiLabels" property="AccountingCardNumberMissing"/></not-empty></process>
+    <process field="cardNumber">
+        <copy/>
+        <not-empty>
+            <fail-property resource="AccountingUiLabels" property="AccountingCardNumberMissing"/>
+        </not-empty>
+        <validate-method method="isAnyCard" class="org.ofbiz.base.util.UtilValidate">
+            <fail-property resource="AccountingUiLabels" property="AccountingCardNumberIncorrect"/>
+        </validate-method>
+    </process>
     <process field="contactMechId"><copy/></process>
     <process field="description"><copy/></process>
     <process field="expMonth"><not-empty><fail-property resource="AccountingUiLabels" property="AccountingExpirationMonthMissing"/></not-empty></process>