[ https://issues.apache.org/jira/browse/OFBIZ-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644560#action_12644560 ]
BJ Freeman commented on OFBIZ-558: ---------------------------------- this patch creates errors for PO's see the link. should back out this patch till PO's work. > support rollback of shipping on failed credit card capture > ---------------------------------------------------------- > > Key: OFBIZ-558 > URL: https://issues.apache.org/jira/browse/OFBIZ-558 > Project: OFBiz > Issue Type: Improvement > Components: accounting > Reporter: Si Chen > Assignee: Si Chen > > You might not realize this, but right now, if a credit card capture failed, > ofbiz would allow the shipment to be created. An invoice to be created but > not paid. This is legally correct of course and correct for b2b situations, > but speaking with several b2c reatilers, this is not a desired behavior. > The solution is fairly simple: > 1. Add a field ProductStore.shipIfCaptureFails which can be set to Y or N > 2. In PaymentGatewayServices.captureOrderPayments at the very end, modify > this block: > if (amountToCapture > 0.00) { > result.put(ModelService.RESPONSE_MESSAGE, > ModelService.RESPOND_SUCCESS); > result.put("processResult", "FAILED"); > return result; > } else { > so that if (amountToCapture > 0.00) is true, then check the order's product > store for shipIfCaptureFails, and if it is an "N", then instead of returning > success with processResult = FAILED, just do a > ServiceUtil.returnError("Cannot ship order because credit card captures were > unsuccessful"); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.