svn commit: r1740012 - in /ofbiz/branches/release13.07: ./ applications/accounting/data/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/accounting/src/...

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

svn commit: r1740012 - in /ofbiz/branches/release13.07: ./ applications/accounting/data/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/ applications/accounting/src/...

jleroux@apache.org
Author: jleroux
Date: Tue Apr 19 21:12:58 2016
New Revision: 1740012

URL: http://svn.apache.org/viewvc?rev=1740012&view=rev
Log:
"Applied fix from trunk for revision: 1626425"
------------------------------------------------------------------------
r1626425 | ashish | 2014-09-20 14:16:37 +0200 (sam. 20 sept. 2014) | 2 lignes

Applied patch from jira issue - OFBIZ-1524 - Improve the way CreditCard.cardType field is managed.
Thanks Akash Jain for the contribution.
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/applications/accounting/data/DemoFinAccountData.xml
    ofbiz/branches/release13.07/applications/accounting/data/DemoGlSetupData.xml
    ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
    ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
    ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
    ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
    ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java
    ofbiz/branches/release13.07/applications/commonext/data/GlAccountData.xml
    ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/billsettings.ftl
    ofbiz/branches/release13.07/applications/party/script/org/ofbiz/party/test/PartyTests.xml
    ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/util/UtilValidate.java
    ofbiz/branches/release13.07/framework/common/webcommon/includes/cctypes.ftl
    ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml
    ofbiz/branches/release13.07/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js
    ofbiz/branches/release13.07/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Apr 19 21:12:58 2016
@@ -5,4 +5,4 @@
 /ofbiz/branches/jquery:952958-1044489
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release12.04:1557118
-/ofbiz/trunk:1506269,1506499,1506504,1506828,1509164,1510042,1511279,1512376,1512573,1516094,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1519999,1520319,1520321,1520326,1524361,1524676,1524704,1524769,1524835,1524950,1525523,1526276,1526387,1526463,1527212,1527254,1527609,1527626,1527810,1528144,1528146,1528149,1528298,1529412,1529418,1529588,1530273,1530634,1530876,1530972,1530976,1531848,1532342,1532366,1533542,1533839,1534062,1535961,1536170,1536656,1537023,1537086,1537179,1537996,1538096,1539147,1539156,1539781,1542264,1542388,1542442,1543744,1543766,1543781,1543994,1544444,1547548,1548143,1549015,1550255,1550258,1550515,1551585,1551744,1552149,1552290,1552500,1552901,1552908,1554064,1554242,1554265,1554290,1554373,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-1557410,1557427,1557440,1557443,1557447,1557456-1557457,1557462,1557593,1558145,1558241,1558373,1558774,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,
 1561327,1561467,1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1570611,1570622,1570639-1570640,1571207,1571219,1571247,1573161,1573498,1573639,1574019,1574201,1574404,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1577744,1579155,1579161,1579277,1579309,1580455,1580850,1581386,1581972,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589589,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597239,1597464,1598113,1598327,1598475,1598544,1598913,1603439,1603732,1603739,1604357,1604363,1604522,1604554,1605029,1605269,1605348,1605354,1605707,1607457,1608355,1608495,1608526,1608698,1609047,1609065,1609076,1609087,1609149,1609155,1609167,1609184,1609389,1609394,1609398,1609406,1609418,1609885,1609889,1610355,1610420,1610425,1610685,1610918,1610925,1611321,16121
 90,1612202,1613121,1614019,1614025,1614280,1614355,1614366,1614556,1615296-1615297,1616272,1616684,1616940,1617229,1617473,1617480,1617936,1617938,1618395,1618397,1618570,1618831,1619087,1619098,1619300,1621335,1621363,1621413,1621436,1621438-1621439,1621442,1621599,1621683,1622050,1622170,1622672,1623370,1624538,1624767,1624809,1624817,1626797,1627230,1627763,1628096,1628130,1628937,1628940,1629382,1629391,1629426,1631203,1631299-1631300,1632764,1632793,1633100,1633188,1633550,1636864,1637883,1639606,1639835,1639840-1639841,1639846,1639863,1639887,1640288,1640299,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642423,1643341,1644904,1645950,1646204,1646935,1646977,1646984,1647266,1647338,1647559,1647606,1648668,1649239,1649393,1650240,1650583,1650642,1650678,1650882,1650938,1651593,1652361,1652725,1652731,1652739,1653456,1654175,1654273,1655046,1655795,1656983,1660389,1660444,1661358,1661612,1661778,1661853,1661873,1661940,1661951,1661977,1662361,1662500,1663912,1663979,16
 64602,1664604,1666633,1666836,1666939,1666949,1667055,1667253,1668214,1668246,1668258,1668265,1668314,1669317,1672862,1672873,1673764,1674447,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1680155,1680304,1680672,1680733,1680840,1680873,1680881,1682272,1682415,1683998,1686566,1686569,1686574,1686583,1686635,1686651,1687427,1690086,1692458,1693579,1696018,1696234,1697993,1701164,1702704,1703121,1703586,1703965,1703977,1703981,1704000,1704018,1704043,1704052,1704082,1704140,1704230,1705004,1706316,1706561,1706591,1706694,1707837,1708341,1708742,1710178,1710348,1711513,1714244,1714410,1714571,1714657,1715477,1715501,1717058,1717180,1717682,1717760,1718023,1718109,1719094,1720883,1721067,1721625,1722712,1724402,1724916,1724918,1724925,1724943,1724946,1724978,1726828,1729609,1729809,1730735,1730882,1731359,1732721,1733951,1733956,1734246,1734269,1734912,1734918,1735244,1735385,1735569,1735731,1735734,1735773,1736083,1736272,1736434
 ,1736851,1736854,1738235,1738303
+/ofbiz/trunk:1506269,1506499,1506504,1506828,1509164,1510042,1511279,1512376,1512573,1516094,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1519999,1520319,1520321,1520326,1524361,1524676,1524704,1524769,1524835,1524950,1525523,1526276,1526387,1526463,1527212,1527254,1527609,1527626,1527810,1528144,1528146,1528149,1528298,1529412,1529418,1529588,1530273,1530634,1530876,1530972,1530976,1531848,1532342,1532366,1533542,1533839,1534062,1535961,1536170,1536656,1537023,1537086,1537179,1537996,1538096,1539147,1539156,1539781,1542264,1542388,1542442,1543744,1543766,1543781,1543994,1544444,1547548,1548143,1549015,1550255,1550258,1550515,1551585,1551744,1552149,1552290,1552500,1552901,1552908,1554064,1554242,1554265,1554290,1554373,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-1557410,1557427,1557440,1557443,1557447,1557456-1557457,1557462,1557593,1558145,1558241,1558373,1558774,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,
 1561327,1561467,1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1570611,1570622,1570639-1570640,1571207,1571219,1571247,1573161,1573498,1573639,1574019,1574201,1574404,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1577744,1579155,1579161,1579277,1579309,1580455,1580850,1581386,1581972,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589589,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597239,1597464,1598113,1598327,1598475,1598544,1598913,1603439,1603732,1603739,1604357,1604363,1604522,1604554,1605029,1605269,1605348,1605354,1605707,1607457,1608355,1608495,1608526,1608698,1609047,1609065,1609076,1609087,1609149,1609155,1609167,1609184,1609389,1609394,1609398,1609406,1609418,1609885,1609889,1610355,1610420,1610425,1610685,1610918,1610925,1611321,16121
 90,1612202,1613121,1614019,1614025,1614280,1614355,1614366,1614556,1615296-1615297,1616272,1616684,1616940,1617229,1617473,1617480,1617936,1617938,1618395,1618397,1618570,1618831,1619087,1619098,1619300,1621335,1621363,1621413,1621436,1621438-1621439,1621442,1621599,1621683,1622050,1622170,1622672,1623370,1624538,1624767,1624809,1624817,1626425,1626797,1627230,1627763,1628096,1628130,1628937,1628940,1629382,1629391,1629426,1631203,1631299-1631300,1632764,1632793,1633100,1633188,1633550,1636864,1637883,1639606,1639835,1639840-1639841,1639846,1639863,1639887,1640288,1640299,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642423,1643341,1644904,1645950,1646204,1646935,1646977,1646984,1647266,1647338,1647559,1647606,1648668,1649239,1649393,1650240,1650583,1650642,1650678,1650882,1650938,1651593,1652361,1652725,1652731,1652739,1653456,1654175,1654273,1655046,1655795,1656983,1660389,1660444,1661358,1661612,1661778,1661853,1661873,1661940,1661951,1661977,1662361,1662500,1663912,16
 63979,1664602,1664604,1666633,1666836,1666939,1666949,1667055,1667253,1668214,1668246,1668258,1668265,1668314,1669317,1672862,1672873,1673764,1674447,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1680155,1680304,1680672,1680733,1680840,1680873,1680881,1682272,1682415,1683998,1686566,1686569,1686574,1686583,1686635,1686651,1687427,1690086,1692458,1693579,1696018,1696234,1697993,1701164,1702704,1703121,1703586,1703965,1703977,1703981,1704000,1704018,1704043,1704052,1704082,1704140,1704230,1705004,1706316,1706561,1706591,1706694,1707837,1708341,1708742,1710178,1710348,1711513,1714244,1714410,1714571,1714657,1715477,1715501,1717058,1717180,1717682,1717760,1718023,1718109,1719094,1720883,1721067,1721625,1722712,1724402,1724916,1724918,1724925,1724943,1724946,1724978,1726828,1729609,1729809,1730735,1730882,1731359,1732721,1733951,1733956,1734246,1734269,1734912,1734918,1735244,1735385,1735569,1735731,1735734,1735773,1736083,1736272
 ,1736434,1736851,1736854,1738235,1738303

Modified: ofbiz/branches/release13.07/applications/accounting/data/DemoFinAccountData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/data/DemoFinAccountData.xml?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/data/DemoFinAccountData.xml (original)
+++ ofbiz/branches/release13.07/applications/accounting/data/DemoFinAccountData.xml Tue Apr 19 21:12:58 2016
@@ -33,7 +33,7 @@ under the License.
             organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="231000" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/>
     <FinAccountStatus finAccountId="AMEX_01" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/>
     <PaymentMethod paymentMethodId="AMEX_01" paymentMethodTypeId="CREDIT_CARD" partyId="Company" description="AmEx 0005" glAccountId="231000" finAccountId="AMEX_01" fromDate="2009-04-01 00:00:00.000"/>
-    <CreditCard paymentMethodId="AMEX_01" cardType="AmericanExpress" cardNumber="378282246310005" expireDate="02/2020" companyNameOnCard="Your Company Name"
+    <CreditCard paymentMethodId="AMEX_01" cardType="CCT_AMERICANEXPRESS" cardNumber="378282246310005" expireDate="02/2020" companyNameOnCard="Your Company Name"
         titleOnCard="" firstNameOnCard="Smart" middleNameOnCard="" lastNameOnCard="Guy" suffixOnCard="" contactMechId="9000"/>
     <PaymentMethod paymentMethodId="PETTY_CASH" paymentMethodTypeId="CASH" partyId="Company" description="Petty Cash" glAccountId="110000" fromDate="2009-04-01 00:00:00.000"/>
 

Modified: ofbiz/branches/release13.07/applications/accounting/data/DemoGlSetupData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/data/DemoGlSetupData.xml?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/data/DemoGlSetupData.xml (original)
+++ ofbiz/branches/release13.07/applications/accounting/data/DemoGlSetupData.xml Tue Apr 19 21:12:58 2016
@@ -365,12 +365,6 @@ under the License.
     <CreditCardTypeGlAccount organizationPartyId="Company" cardType="CCT_VISA" glAccountId="122300"/>
     <CreditCardTypeGlAccount organizationPartyId="Company" cardType="CCT_MASTERCARD" glAccountId="122300"/>
 
-    <!-- The following ones are required until the issue OFBIZ-1524 is resolved -->
-    <CreditCardTypeGlAccount organizationPartyId="Company" cardType="AmericanExpress" glAccountId="122100"/>
-    <CreditCardTypeGlAccount organizationPartyId="Company" cardType="DinersClub" glAccountId="122100"/>
-    <CreditCardTypeGlAccount organizationPartyId="Company" cardType="Discover" glAccountId="122200"/>
-    <CreditCardTypeGlAccount organizationPartyId="Company" cardType="Visa" glAccountId="122300"/>
-    <CreditCardTypeGlAccount organizationPartyId="Company" cardType="MasterCard" glAccountId="122300"/>
     <!--
     No need to load these if they are set with the 122000 account (the default for the CREDIT_CARD payment method type)
     <CreditCardTypeGlAccount organizationPartyId="Company" cardType="CCT_ENROUTE" glAccountId="122000"/>

Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original)
+++ ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Tue Apr 19 21:12:58 2016
@@ -2868,13 +2868,13 @@ public class PaymentGatewayServices {
             if (creditCard != null) {
                 String cardType = creditCard.getString("cardType");
                 // add more types as necessary -- maybe we should create seed data for credit card types??
-                if ("Discover".equals(cardType)) {
+                if ("CCT_DISCOVER".equals(cardType)) {
                     reauthDays = UtilProperties.getPropertyValue(paymentConfig, "payment.general.reauth.disc.days", "90");
-                } else if ("AmericanExpress".equals(cardType)) {
+                } else if ("CCT_AMERICANEXPRESS".equals(cardType)) {
                     reauthDays = UtilProperties.getPropertyValue(paymentConfig, "payment.general.reauth.amex.days", "30");
-                } else if ("MasterCard".equals(cardType)) {
+                } else if ("CCT_MASTERCARD".equals(cardType)) {
                     reauthDays = UtilProperties.getPropertyValue(paymentConfig, "payment.general.reauth.mc.days", "30");
-                } else if ("Visa".equals(cardType)) {
+                } else if ("CCT_VISA".equals(cardType)) {
                     reauthDays = UtilProperties.getPropertyValue(paymentConfig, "payment.general.reauth.visa.days", "7");
                 } else {
                     reauthDays = UtilProperties.getPropertyValue(paymentConfig, "payment.general.reauth.other.days", "7");

Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original)
+++ ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Tue Apr 19 21:12:58 2016
@@ -810,12 +810,12 @@ public class AIMPaymentServices {
     }
     
     private static String getCardType(String cardType) {
-        if ((cardType.equalsIgnoreCase("VISA"))) return "V";
-        if ((cardType.equalsIgnoreCase("MASTERCARD"))) return "M";
-        if (((cardType.equalsIgnoreCase("AMERICANEXPRESS")) || (cardType.equalsIgnoreCase("AMEX")))) return "A";
-        if ((cardType.equalsIgnoreCase("DISCOVER"))) return "D";
-        if ((cardType.equalsIgnoreCase("JCB"))) return "J";
-        if (((cardType.equalsIgnoreCase("DINERSCLUB")))) return "C";        
+        if (("CCT_VISA".equalsIgnoreCase(cardType))) return "V";
+        if (("CCT_MASTERCARD".equalsIgnoreCase(cardType))) return "M";
+        if ((("CCT_AMERICANEXPRESS".equalsIgnoreCase(cardType)) || ("CCT_AMEX".equalsIgnoreCase(cardType)))) return "A";
+        if (("CCT_DISCOVER".equalsIgnoreCase(cardType))) return "D";
+        if (("CCT_JCB".equalsIgnoreCase(cardType))) return "J";
+        if ((("CCT_DINERSCLUB".equalsIgnoreCase(cardType)))) return "C";        
         return "";
     }
     

Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java (original)
+++ ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java Tue Apr 19 21:12:58 2016
@@ -56,7 +56,7 @@ public class CCServicesTest extends OFBi
         creditAmount = new BigDecimal("234.00");
         emailAddr = delegator.makeValue("ContactMech", UtilMisc.toMap("infoString","[hidden email]"));
         orderId = "testOrder1000";
-        creditCard = delegator.makeValue("CreditCard", UtilMisc.toMap("cardType","VISA",
+        creditCard = delegator.makeValue("CreditCard", UtilMisc.toMap("cardType","CCT_VISA",
                 "expireDate","12/2008",  // mm/yyyy, gets converted to mm/yy
                 "cardNumber","4111111111111111"));
         billingAddress = delegator.makeValue("PostalAddress", UtilMisc.toMap("toName","The customer Name",

Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java (original)
+++ ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java Tue Apr 19 21:12:58 2016
@@ -99,16 +99,16 @@ public class SagePayPaymentServices {
                     nameOnCard = firstName + " " + middleName + " " + lastName;
                     cardType = creditCard.getString("cardType");
                     if (cardType != null) {
-                        if (cardType.equals("MasterCard")) {
+                        if ("CCT_MASTERCARD".equals(cardType)) {
                             cardType = "MC";
                         }
-                        if (cardType.equals("VisaElectron")) {
+                        if ("CCT_VISAELECTRON".equals(cardType)) {
                             cardType = "UKE";
                         }
-                        if (cardType.equals("DinersClub")) {
+                        if ("CCT_DINERSCLUB".equals(cardType)) {
                             cardType = "DC";
                         }
-                        if (cardType.equals("Switch")) {
+                        if ("CCT_SWITCH".equals(cardType)) {
                             cardType = "MAESTRO";
                         }
                     }

Modified: ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java (original)
+++ ofbiz/branches/release13.07/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java Tue Apr 19 21:12:58 2016
@@ -67,7 +67,7 @@ public class SecurePayServiceTest extend
                 "infoString","[hidden email]"));
         orderId = "Demo1002";
         creditCard = delegator.makeValue("CreditCard", UtilMisc.toMap(
-                "cardType","VISA",
+                "cardType","CCT_VISA",
                 "expireDate","10/2011",  // mm/yyyy, gets converted to mm/yy
                 "cardNumber","4444333322221111"));
         billingAddress = delegator.makeValue("PostalAddress", UtilMisc.toMap(

Modified: ofbiz/branches/release13.07/applications/commonext/data/GlAccountData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/commonext/data/GlAccountData.xml?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/commonext/data/GlAccountData.xml (original)
+++ ofbiz/branches/release13.07/applications/commonext/data/GlAccountData.xml Tue Apr 19 21:12:58 2016
@@ -142,13 +142,6 @@
     <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="CCT_VISA" glAccountId="122300"/>
     <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="CCT_MASTERCARD" glAccountId="122300"/>
     
-    <!-- The following ones are required until the issue OFBIZ-1524 is resolved -->
-    <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="AmericanExpress" glAccountId="122100"/>
-    <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="DinersClub" glAccountId="122100"/>
-    <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="Discover" glAccountId="122200"/>
-    <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="Visa" glAccountId="122300"/>
-    <CreditCardTypeGlAccount organizationPartyId="ORGPARTYID" cardType="MasterCard" glAccountId="122300"/>
-    
     <FinAccountTypeGlAccount organizationPartyId="ORGPARTYID" finAccountTypeId="GIFTCERT_ACCOUNT" glAccountId="213200"/>
     <FinAccountTypeGlAccount organizationPartyId="ORGPARTYID" finAccountTypeId="DEPOSIT_ACCOUNT" glAccountId="213500"/>
     <FinAccountTypeGlAccount organizationPartyId="ORGPARTYID" finAccountTypeId="BANK_ACCOUNT" glAccountId="213500"/>

Modified: ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/billsettings.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/billsettings.ftl?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/billsettings.ftl (original)
+++ ofbiz/branches/release13.07/applications/order/webapp/ordermgr/entry/billsettings.ftl Tue Apr 19 21:12:58 2016
@@ -346,13 +346,7 @@ function makeExpDate() {
                     <option>${creditCard.cardType}</option>
                     <option value="${creditCard.cardType}">---</option>
                     </#if>
-                    <option>Visa</option>
-                    <option value='MasterCard'>Master Card</option>
-                    <option value='AmericanExpress'>American Express</option>
-                    <option value='DinersClub'>Diners Club</option>
-                    <option>Discover</option>
-                    <option>EnRoute</option>
-                    <option>JCB</option>
+                    ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
                   </select>
                 *</td>
               </tr>

Modified: ofbiz/branches/release13.07/applications/party/script/org/ofbiz/party/test/PartyTests.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/party/script/org/ofbiz/party/test/PartyTests.xml?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/party/script/org/ofbiz/party/test/PartyTests.xml (original)
+++ ofbiz/branches/release13.07/applications/party/script/org/ofbiz/party/test/PartyTests.xml Tue Apr 19 21:12:58 2016
@@ -81,7 +81,7 @@ under the License.
         <clear-field field="oldPaymentMethodId"/>
 
         <!-- try now with few changes (cardType, cardNumber in this case), a new record will be created in PaymentMethod, CreditCard entity -->
-        <set field="serviceCtx.cardType" value="MasterCard"/>
+        <set field="serviceCtx.cardType" value="CCT_MASTERCARD"/>
         <set field="serviceCtx.cardNumber" value="5500000000000004"/>
         <call-service service-name="updateCreditCard" in-map-name="serviceCtx">
             <result-to-field result-name="paymentMethodId"/>

Modified: ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/util/UtilValidate.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/branches/release13.07/framework/base/src/org/ofbiz/base/util/UtilValidate.java Tue Apr 19 21:12:58 2016
@@ -1243,16 +1243,16 @@ public class UtilValidate {
 
         if (!isCreditCard(cc)) return "Unknown";
 
-        if (isMasterCard(cc)) return "MasterCard";
-        if (isVisa(cc)) return "Visa";
-        if (isAmericanExpress(cc)) return "AmericanExpress";
-        if (isDinersClub(cc)) return "DinersClub";
-        if (isDiscover(cc)) return "Discover";
-        if (isEnRoute(cc)) return "EnRoute";
-        if (isJCB(cc)) return "JCB";
-        if (isSolo(cc)) return "Solo";
-        if (isswitch (cc)) return "Switch";
-        if (isVisaElectron(cc)) return "VisaElectron";
+        if (isMasterCard(cc)) return "CCT_MASTERCARD";
+        if (isVisa(cc)) return "CCT_VISA";
+        if (isAmericanExpress(cc)) return "CCT_AMERICANEXPRESS";
+        if (isDinersClub(cc)) return "CCT_DINERSCLUB";
+        if (isDiscover(cc)) return "CCT_DISCOVER";
+        if (isEnRoute(cc)) return "CCT_ENROUTE";
+        if (isJCB(cc)) return "CCT_JCB";
+        if (isSolo(cc)) return "CCT_SOLO";
+        if (isswitch (cc)) return "CCT_SWITCH";
+        if (isVisaElectron(cc)) return "CCT_VISAELECTRON";
         return "Unknown";
     }
 
@@ -1266,17 +1266,17 @@ public class UtilValidate {
         if (isEmpty(cardNumberPassed)) return defaultEmptyOK;
         String cardNumber = stripCharsInBag(cardNumberPassed, creditCardDelimiters);
 
-        if ((cardType.equalsIgnoreCase("VISA")) && (isVisa(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("MASTERCARD")) && (isMasterCard(cardNumber))) return true;
-        if (((cardType.equalsIgnoreCase("AMERICANEXPRESS")) || (cardType.equalsIgnoreCase("AMEX"))) && (isAmericanExpress(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("DISCOVER")) && (isDiscover(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("JCB")) && (isJCB(cardNumber))) return true;
-        if (((cardType.equalsIgnoreCase("DINERSCLUB")) || (cardType.equalsIgnoreCase("DINERS"))) && (isDinersClub(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("CARTEBLANCHE")) && (isCarteBlanche(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("ENROUTE")) && (isEnRoute(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("SOLO")) && (isSolo(cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("SWITCH")) && (isswitch (cardNumber))) return true;
-        if ((cardType.equalsIgnoreCase("VISAELECTRON")) && (isVisaElectron(cardNumber))) return true;
+        if (("CCT_VISA".equalsIgnoreCase(cardType)) && (isVisa(cardNumber))) return true;
+        if (("CCT_MASTERCARD".equalsIgnoreCase(cardType)) && (isMasterCard(cardNumber))) return true;
+        if ((("CCT_AMERICANEXPRESS".equalsIgnoreCase(cardType)) || ("CCT_AMEX".equalsIgnoreCase(cardType))) && (isAmericanExpress(cardNumber))) return true;
+        if (("CCT_DISCOVER".equalsIgnoreCase(cardType)) && (isDiscover(cardNumber))) return true;
+        if (("CCT_JCB".equalsIgnoreCase(cardType)) && (isJCB(cardNumber))) return true;
+        if ((("CCT_DINERSCLUB".equalsIgnoreCase(cardType)) || ("CCT_DINERS".equalsIgnoreCase(cardType))) && (isDinersClub(cardNumber))) return true;
+        if (("CCT_CARTEBLANCHE".equalsIgnoreCase(cardType)) && (isCarteBlanche(cardNumber))) return true;
+        if (("CCT_ENROUTE".equalsIgnoreCase(cardType)) && (isEnRoute(cardNumber))) return true;
+        if (("CCT_SOLO".equalsIgnoreCase(cardType)) && (isSolo(cardNumber))) return true;
+        if (("CCT_SWITCH".equalsIgnoreCase(cardType)) && (isswitch (cardNumber))) return true;
+        if (("CCT_VISAELECTRON".equalsIgnoreCase(cardType)) && (isVisaElectron(cardNumber))) return true;
         return false;
     }
 

Modified: ofbiz/branches/release13.07/framework/common/webcommon/includes/cctypes.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/webcommon/includes/cctypes.ftl?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/common/webcommon/includes/cctypes.ftl (original)
+++ ofbiz/branches/release13.07/framework/common/webcommon/includes/cctypes.ftl Tue Apr 19 21:12:58 2016
@@ -16,10 +16,6 @@ KIND, either express or implied.  See th
 specific language governing permissions and limitations
 under the License.
 -->
-<option value="Visa">Visa</option>
-<option value='MasterCard'>Master Card</option>
-<option value='AmericanExpress'>American Express</option>
-<option value='DinersClub'>Diners Club</option>
-<option value="Discover">Discover</option>
-<option value="EnRoute">EnRoute</option>
-<option value="JCB">JCB</option>
+<#list creditCardTypes as creditCardType>
+  <option value="${creditCardType.enumId}">${creditCardType.enumCode}</option>
+</#list>
\ No newline at end of file

Modified: ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/branches/release13.07/framework/common/widget/CommonScreens.xml Tue Apr 19 21:12:58 2016
@@ -42,6 +42,9 @@ under the License.
 
     <screen name="cctypes">
         <section>
+            <actions>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/CcTypes.groovy"/>
+            </actions>
             <widgets>
                 <platform-specific><html><html-template location="component://common/webcommon/includes/cctypes.ftl"/></html></platform-specific>
             </widgets>

Modified: ofbiz/branches/release13.07/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js (original)
+++ ofbiz/branches/release13.07/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js Tue Apr 19 21:12:58 2016
@@ -421,28 +421,28 @@ jQuery.validator.addMethod("creditcardty
 
  var validTypes = 0x0000;
 
- if (param.mastercard) {
+ if (param.CCT_MASTERCARD) {
  validTypes |= 0x0001;
  }
- if (param.visa) {
+ if (param.CCT_VISA) {
  validTypes |= 0x0002;
  }
- if (param.amex) {
+ if (param.CCT_AMEX) {
  validTypes |= 0x0004;
  }
- if (param.dinersclub) {
+ if (param.CCT_DINERSCLUB) {
  validTypes |= 0x0008;
  }
- if (param.enroute) {
+ if (param.CCT_ENROUTE) {
  validTypes |= 0x0010;
  }
- if (param.discover) {
+ if (param.CCT_DISCOVER) {
  validTypes |= 0x0020;
  }
- if (param.jcb) {
+ if (param.CCT_JCB) {
  validTypes |= 0x0040;
  }
- if (param.unknown) {
+ if (param.CCT_UNKNOWN) {
  validTypes |= 0x0080;
  }
  if (param.all) {

Modified: ofbiz/branches/release13.07/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml?rev=1740012&r1=1740011&r2=1740012&view=diff
==============================================================================
--- ofbiz/branches/release13.07/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml (original)
+++ ofbiz/branches/release13.07/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml Tue Apr 19 21:12:58 2016
@@ -144,7 +144,7 @@ under the License.
     <PartyContactMechPurpose partyId="DemoCustomer" contactMechId="9026" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
 
     <PaymentMethod paymentMethodId="9015" paymentMethodTypeId="CREDIT_CARD" partyId="DemoCustomer" fromDate="2001-05-13 00:00:00.000"/>
-    <CreditCard paymentMethodId="9015" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2021" companyNameOnCard=""
+    <CreditCard paymentMethodId="9015" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2021" companyNameOnCard=""
         titleOnCard="" firstNameOnCard="DEMO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="9015"/>
 
     <!-- EuroCustomer want invoices in euro and be located in Amsterdam -->
@@ -170,7 +170,7 @@ under the License.
     <PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EURO01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
 
     <PaymentMethod paymentMethodId="EUROCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="EuroCustomer" fromDate="2001-05-13 00:00:00.000"/>
-    <CreditCard paymentMethodId="EUROCUSTOMER" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2021" companyNameOnCard=""
+    <CreditCard paymentMethodId="EUROCUSTOMER" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2021" companyNameOnCard=""
     titleOnCard="" firstNameOnCard="EURO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="EUROCUSTOMER"/>
 
     <!-- FrenchCustomer want invoices in euro and be located in Poussan -->
@@ -196,6 +196,6 @@ under the License.
     <PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRA01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2009-01-09 00:00:00.000"/>
 
     <PaymentMethod paymentMethodId="FRENCHCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="FrenchCustomer" fromDate="2009-01-09 00:00:00.000"/>
-    <CreditCard paymentMethodId="FRENCHCUSTOMER" cardType="Visa" cardNumber="4111111111111111" expireDate="02/2020" companyNameOnCard=""
+    <CreditCard paymentMethodId="FRENCHCUSTOMER" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2020" companyNameOnCard=""
         titleOnCard="" firstNameOnCard="FRENCH" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="FRENCHCUSTOMER"/>
 </entity-engine-xml>