You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Si Chen (JIRA)" <ji...@apache.org> on 2006/12/22 01:51:21 UTC

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

support rollback of shipping on failed credit card capture
----------------------------------------------------------

                 Key: OFBIZ-558
                 URL: http://issues.apache.org/jira/browse/OFBIZ-558
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
          Components: accounting
            Reporter: 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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-558?page=comments#action_12460641 ] 
            
David E. Jones commented on OFBIZ-558:
--------------------------------------

Sounds like a good error-prone thingy to take care of.

On the implementation, instead of manually creating the result Map you might want to try a ServiceUtil method (there are various meant to make this sort of thing easier).

> support rollback of shipping on failed credit card capture
> ----------------------------------------------------------
>
>                 Key: OFBIZ-558
>                 URL: http://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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/OFBIZ-558?page=comments#action_12460372 ] 
            
Si Chen commented on OFBIZ-558:
-------------------------------

I probably won't have to work on this for a while, so if anybody wants to do it and submit a patch, feel free to do so :)  I will keep an eye out for them in the mean time.

> support rollback of shipping on failed credit card capture
> ----------------------------------------------------------
>
>                 Key: OFBIZ-558
>                 URL: http://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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Si Chen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/OFBIZ-558?page=all ]

Si Chen reassigned OFBIZ-558:
-----------------------------

    Assignee: Si Chen

> support rollback of shipping on failed credit card capture
> ----------------------------------------------------------
>
>                 Key: OFBIZ-558
>                 URL: http://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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira