Author: ashish
Date: Sat Sep 20 12:16:37 2014 New Revision: 1626425 URL: http://svn.apache.org/r1626425 Log: Applied patch from jira issue - OFBIZ-1524 - Improve the way CreditCard.cardType field is managed. Thanks Akash Jain for the contribution. Modified: ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java ofbiz/trunk/applications/commonext/data/GlAccountData.xml ofbiz/trunk/applications/order/webapp/ordermgr/entry/billsettings.ftl ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java ofbiz/trunk/framework/common/webcommon/includes/cctypes.ftl ofbiz/trunk/framework/common/widget/CommonScreens.xml ofbiz/trunk/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js ofbiz/trunk/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml Modified: ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml (original) +++ ofbiz/trunk/applications/accounting/data/DemoFinAccountData.xml Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/accounting/data/DemoGlSetupData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml (original) +++ ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml Sat Sep 20 12:16:37 2014 @@ -364,12 +364,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/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayPaymentServices.java Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java (original) +++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/thirdparty/securepay/SecurePayServiceTest.java Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/commonext/data/GlAccountData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/data/GlAccountData.xml?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/data/GlAccountData.xml (original) +++ ofbiz/trunk/applications/commonext/data/GlAccountData.xml Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/order/webapp/ordermgr/entry/billsettings.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/billsettings.ftl?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/billsettings.ftl (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/billsettings.ftl Sat Sep 20 12:16:37 2014 @@ -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/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml (original) +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/test/PartyTests.xml Sat Sep 20 12:16:37 2014 @@ -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/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java Sat Sep 20 12:16:37 2014 @@ -1241,16 +1241,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"; } @@ -1264,17 +1264,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/trunk/framework/common/webcommon/includes/cctypes.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/cctypes.ftl?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/cctypes.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/cctypes.ftl Sat Sep 20 12:16:37 2014 @@ -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/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sat Sep 20 12:16:37 2014 @@ -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/trunk/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js (original) +++ ofbiz/trunk/framework/images/webapp/images/jquery/plugins/validate/additional-methods.js Sat Sep 20 12:16:37 2014 @@ -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/trunk/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml?rev=1626425&r1=1626424&r2=1626425&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml (original) +++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoOrderPeopleData.xml Sat Sep 20 12:16:37 2014 @@ -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,7 +196,7 @@ 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"/> <PartyTaxAuthInfo partyId="FrenchCustomer" taxAuthGeoId="FRA" taxAuthPartyId="FRA_TA" fromDate="2001-05-13 00:00:00.000" partyTaxId="FR-12345678901" isExempt="N"/> |
Free forum by Nabble | Edit this page |