OFBiz
  1. OFBiz
  2. OFBIZ-2977

Abilty to allow Product Store to indicate which credit card types they accept

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Activity

      Hide
      Bob Morley added a comment -

      The biggest impact here is that credit cards have a type which is now stored as the enumeration id (ie. CCT_VISA) rather then a hardcoded value from cctypes.ftl. This resulted in changes in a few spots to properly get the localized value for that credit card (enumeration.get("description")). Having said this, the old values still work as expected on all pages (the relationship between CreditCard and Enumeration is not enforced which would cause a migration script).

      If someone has an existing product store that does not set the ProductStoreCreditCardSettings the pages will render the old hardcoded list that was defined in cctypes.ftl. This is achieved by having ProductStoreWorker.getProductStoreCreditCardSettingEnumerations return this list when the found product store does not have any settings setup. The theory is that if there are none setup, this implies old setup and NOT a store that wants to accept no credit cards. The latter would be handled by not setting up the ProductStorePaymentMethod of type CREDIT_CARD.

      The back-end applications (accounting and party) now show the entire list of credit cards defined in the enumeration of enumTypeId = "CREDIT_CARD_TYPE" rather then the subset of supported types. Since this is not outward facing I felt it was ok to show "all" credit cards here. It also facilitates multiple e-commerce stores that accept different credits cards, but may use a backend that needs to perform actions on the superset (by showing all available).

      Show
      Bob Morley added a comment - The biggest impact here is that credit cards have a type which is now stored as the enumeration id (ie. CCT_VISA) rather then a hardcoded value from cctypes.ftl. This resulted in changes in a few spots to properly get the localized value for that credit card (enumeration.get("description")). Having said this, the old values still work as expected on all pages (the relationship between CreditCard and Enumeration is not enforced which would cause a migration script). If someone has an existing product store that does not set the ProductStoreCreditCardSettings the pages will render the old hardcoded list that was defined in cctypes.ftl. This is achieved by having ProductStoreWorker.getProductStoreCreditCardSettingEnumerations return this list when the found product store does not have any settings setup. The theory is that if there are none setup, this implies old setup and NOT a store that wants to accept no credit cards. The latter would be handled by not setting up the ProductStorePaymentMethod of type CREDIT_CARD. The back-end applications (accounting and party) now show the entire list of credit cards defined in the enumeration of enumTypeId = "CREDIT_CARD_TYPE" rather then the subset of supported types. Since this is not outward facing I felt it was ok to show "all" credit cards here. It also facilitates multiple e-commerce stores that accept different credits cards, but may use a backend that needs to perform actions on the superset (by showing all available).
      Hide
      Bob Morley added a comment -

      Majority of work is done here. The pieces that are currently missing are:

      1) editing a credit card does not properly set the known credit card in the drop-down (fyi - this never did work properly). It does work on post-back as part of a new credit card.

      2) there is no admin page to setup the ProductStoreCreditCardSettings – there is default seeding as part of the demo data that matches the historic set of "supported" credit cards

      Show
      Bob Morley added a comment - Majority of work is done here. The pieces that are currently missing are: 1) editing a credit card does not properly set the known credit card in the drop-down (fyi - this never did work properly). It does work on post-back as part of a new credit card. 2) there is no admin page to setup the ProductStoreCreditCardSettings – there is default seeding as part of the demo data that matches the historic set of "supported" credit cards

        People

        • Assignee:
          Unassigned
          Reporter:
          Bob Morley
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:

            Development