[jira] Closed: (OFBIZ-558) support rollback of shipping on failed credit card capture

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

[jira] Closed: (OFBIZ-558) support rollback of shipping on failed credit card capture

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Si Chen closed OFBIZ-558.
-------------------------

    Resolution: Fixed

> support rollback of shipping on failed credit card capture
> ----------------------------------------------------------
>
>                 Key: OFBIZ-558
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-558
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: accounting
>            Reporter: Si Chen
>         Assigned To: 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.