Fix a bug reported by Mark Schneider on user ML:
>It looks like a wrong credit card number leads to the following error message in UI (tested with one-page checkout): > # --- > ... (INSERT on table 'ORDER_CONTACT_MECH' caused a violation of foreign key constraint 'ORDER_CMECH_CM' for key (10005). ... > > I would rather expect an error message like "invalid credit cartd number" instead. jleroux: the bug was actually double 1st: a last issue related to https://issues.apache.org/jira/browse/OFBIZ-5102 after https://issues.apache.org/jira/browse/OFBIZ-3883 2nd: the cardNumber was missing a creditcard class (jquery.validate.js messages) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -105,7 +105,7 @@ under the License.
|
||||
<string value="SHIPPING_LOCATION"/>
|
||||
<field field="parameters.shipToContactMechId"/>
|
||||
</call-object-method>
|
||||
<call-object-method obj-field="shoppingCart" method-name="setShippingContactMechId">
|
||||
<call-object-method obj-field="shoppingCart" method-name="setAllShippingContactMechId">
|
||||
<field field="parameters.shipToContactMechId"/>
|
||||
</call-object-method>
|
||||
<call-object-method obj-field="shoppingCart" method-name="setOrderPartyId">
|
||||
@@ -190,6 +190,7 @@ under the License.
|
||||
</create-object>
|
||||
<set field="callResult" value="${groovy:checkOutHelper.finalizeOrderEntryPayment(paymentMethodId, null, false, false)}"/>
|
||||
<set field="cartPaymentInfo" value="${groovy: org.ofbiz.order.shoppingcart.ShoppingCart.CartPaymentInfo cpi = shoppingCart.getPaymentInfo(paymentMethodId, null, null, null, true); cpi.securityCode = cardSecurityCode; return cpi;}"/>
|
||||
<check-errors/>
|
||||
</simple-method>
|
||||
|
||||
<simple-method method-name="setAnonUserLogin" short-description="Set user login in the session" login-required="false">
|
||||
|
||||
@@ -380,7 +380,7 @@ under the License.
|
||||
<label for="cardNumber">${uiLabelMap.AccountingCardNumber}*
|
||||
<span id="advice-required-cardNumber" style="display: none;" class="errorMessage"> (${uiLabelMap.CommonRequired})</span>
|
||||
</label>
|
||||
<input id="cardNumber" name="cardNumber" class="required" type="text" value="${cardNumber?if_exists}" size="30" maxlength="16" />
|
||||
<input id="cardNumber" name="cardNumber" class="required creditcard" type="text" value="${cardNumber?if_exists}" size="30" maxlength="16" />
|
||||
</span>
|
||||
<span>
|
||||
<label for="billToCardSecurityCode">CVV2</label>
|
||||
|
||||
Reference in New Issue
Block a user