|
Author: jleroux
Date: Tue Aug 10 11:20:55 2010 New Revision: 983930 URL: http://svn.apache.org/viewvc?rev=983930&view=rev Log: A patch from René Scheibe <<"createUpdateBillingAddressAndPaymentMethod" service called from one page checkout throws Exception due to incorrect field name>> (https://issues.apache.org/jira/browse/OFBIZ-3887) - OFBIZ-3887 Problem: The method "createUpdateBillingAddressAndPaymentMethod" in CheckoutServices.xml refers to a "billToCardSecurityCode" parameter, which is not existing. Instead OnePageCheckoutProcess.ftl defines this field with id="CVV2" and name="cardSecurityCode". Solution: 1. Change the "id" and "name" in OnePageCheckoutProcess.ftl to meet the attribute name of "createUpdateBillingAddressAndPaymentMethod". 2. Extend the attribute mapping line in CheckoutServices.xml so that in case the CVV2 is not entered by the user, the field is defined anyway. (otherwise groovy.lang.MissingPropertyException is still thrown as the field is always accessed) Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml?rev=983930&r1=983929&r2=983930&view=diff ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml Tue Aug 10 11:20:55 2010 @@ -180,7 +180,7 @@ under the License. <result-to-result result-name="paymentMethodId"/> </call-service> <!-- Set Payment Method--> - <set field="cardSecurityCode" from-field="parameters.billToCardSecurityCode"/> + <set field="cardSecurityCode" from-field="parameters.billToCardSecurityCode" set-if-null="true" set-if-empty="true"/> <create-object class-name="org.ofbiz.order.shoppingcart.CheckOutHelper" field="checkOutHelper"> <field field="dispatcher" type="org.ofbiz.service.LocalDispatcher"/> <field field="delegator" type="org.ofbiz.entity.Delegator"/> Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=983930&r1=983929&r2=983930&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original) +++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Tue Aug 10 11:20:55 2010 @@ -543,8 +543,8 @@ under the License. <input id="cardNumber" name="cardNumber" class="required" type="text" value="${cardNumber?if_exists}" size="30" maxlength="16" /> </span> <span> - <label for="CVV2">CVV2</label> - <input id="CVV2" name="cardSecurityCode" size="4" type="text" maxlength="4" value="" /> + <label for="billToCardSecurityCode">CVV2</label> + <input id="billToCardSecurityCode" name="billToCardSecurityCode" size="4" type="text" maxlength="4" value="" /> </span> </div> <div> @@ -656,4 +656,4 @@ under the License. <h3>${uiLabelMap.EcommerceStep} 4: ${uiLabelMap.AccountingBilling}</h3> <h3>${uiLabelMap.EcommerceStep} 5: ${uiLabelMap.OrderSubmitOrder}</h3> </div> -</div> \ No newline at end of file +</div> |
| Free forum by Nabble | Edit this page |
