[jira] Created: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

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

[jira] Created: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

Nicolas Malin (Jira)
Improvements to the CheckOutHelper class to enhance reusability
---------------------------------------------------------------

                 Key: OFBIZ-992
                 URL: https://issues.apache.org/jira/browse/OFBIZ-992
             Project: OFBiz (The Open for Business Project)
          Issue Type: Improvement
            Reporter: Jacopo Cappellato
            Priority: Minor


In the CheckOutHelper class, all the methods that don't need the cart object (needed by the class' constructor) should be moved to another class or at least declared as static.

This is the list of the methods:

checkExternalPayment(...) uses the cart only to get the locale for messages
availableAccountBalance(...)
makeBillingAccountMap(...)

We should also refactor the following methods into services that don't require the cart to operate:
processPayment(...)
adjustFaceToFacePayment(...)

the reason is that they are used by the edit order screens (and ecas) and a cart must be loaded from the order before calling them.


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496578 ]

David E. Jones commented on OFBIZ-992:
--------------------------------------

There has been a fair amount of talk about doing a lot of refactoring of the cart and related objects and cleaning up the fact that logic is split in so many ways that just don't make any sense (like similar stuff split between ShoppingCartEvents, ShoppingCartHelper, ShoppingCart, ShoppingCartLine, etc).

I think the CheckOutHelper stuff will eventually fall into that bigger effort, just an FYI (not that it really matters for this task).

> Improvements to the CheckOutHelper class to enhance reusability
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-992
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-992
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>            Reporter: Jacopo Cappellato
>            Priority: Minor
>
> In the CheckOutHelper class, all the methods that don't need the cart object (needed by the class' constructor) should be moved to another class or at least declared as static.
> This is the list of the methods:
> checkExternalPayment(...) uses the cart only to get the locale for messages
> availableAccountBalance(...)
> makeBillingAccountMap(...)
> We should also refactor the following methods into services that don't require the cart to operate:
> processPayment(...)
> adjustFaceToFacePayment(...)
> the reason is that they are used by the edit order screens (and ecas) and a cart must be loaded from the order before calling them.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-992) Improvements to the CheckOutHelper class to enhance reusability

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacopo Cappellato closed OFBIZ-992.
-----------------------------------

    Resolution: Fixed

I've refactored the payments methods to static methods that don't require a cart object (and this was the most urgent task).
Of course, the class could be further improved but as mentioned by David, this could be part of a wider refactoring effort.


> Improvements to the CheckOutHelper class to enhance reusability
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-992
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-992
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>            Reporter: Jacopo Cappellato
>            Priority: Minor
>
> In the CheckOutHelper class, all the methods that don't need the cart object (needed by the class' constructor) should be moved to another class or at least declared as static.
> This is the list of the methods:
> checkExternalPayment(...) uses the cart only to get the locale for messages
> availableAccountBalance(...)
> makeBillingAccountMap(...)
> We should also refactor the following methods into services that don't require the cart to operate:
> processPayment(...)
> adjustFaceToFacePayment(...)
> the reason is that they are used by the edit order screens (and ecas) and a cart must be loaded from the order before calling them.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.