Product Store credit card payment setting restrictions

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

Product Store credit card payment setting restrictions

Bob Morley
Started working on the ability for our product store to configure which payment methods are available to them.  The current support in Ofbiz appears to allow me to do this at the PaymentMethodType level -- CREDIT_CARD, EFT_ACCOUNT, FIN_ACCOUNT, GIFT_CARD, etc.  What it does not appear to let me do is to restrict to the various sub-types in that payment method (VISA, MASTERCARD, etc).  These things seem to be rendered in a hard-coded cctypes.ftl file (which also does not seem to make use of the cardType enumeration (ie. "Visa" is used on the CreditCard.cardType instead of CCT_VISA).

SO, what I want to do is be able to configure the various credit card types that are applicable to the CREDIT_CARD payment method.  I would also like to be able to drive the rendering of this from the enumerations of type CREDIT_CARD_TYPE.

What I am suggesting is a new entity "ProductStoreCreditCardSetting" that will seed to the same set of credit cards that are produced in the cctypes.ftl file.  I would then change the rendering of this ftl to make use of these including using the key in the options widget to be the proper enumeration key.  A new page in the product store setup to support indicating which credit card types are available as form of payment in the product store.  Finally impact analysis to make sure that there is not code that is making use of the key and has the expectation that it is "Visa" instead of "CCT_VISA".

The other option I considered was modeling each credit card as a separate payment method.  This would allow us to have different services for each of the credit cards but force a change in how the ecommerce payment method / credit card is selected.

Thoughts?