Hi to all,
what did you think if we move the payment.properties to an entity ? I tried to having a more general entity but I have seen that every single payment gateway having different parameters and so I tried with the following example: <EnumerationType description="Payment Gateway Code" enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> <Enumeration description="Gift Certificate" enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" sequenceId="01" enumTypeId="PGW_CODE"/> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> <Enumeration description="ValueLink" enumCode="VALUELINK" enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> <Enumeration description="WorldPay" enumCode="WORLDPAY" enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> <Enumeration description="PayPal" enumCode="PAYPAL" enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> <Enumeration description="PCCharge" enumCode="PCCHARGE" enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" sequenceId="09" enumTypeId="PGW_CODE"/> <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> <!-- Product store gateway setting --> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" attributeValue="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" activeAttribute="Y" comment="Path the the VeriSign Certificate"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" attributeValue="test-payflow.verisign.com" activeAttribute="Y" comment="Address of the payment processor"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" attributeValue="443" activeAttribute="Y" comment="Port of the payment processor"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow account information (Vendor)"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="user" attributeValue="[PayFlow UserID]" activeAttribute="Y" comment="Payflow account information (PayFlow UserID)"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" attributeValue="[PayFlow Password]" activeAttribute="Y" comment="Payflow account information (PayFlow Password)"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" attributeValue="[PayFlow Partner]" activeAttribute="Y" comment="Payflow account information (PayFlow Partner)"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" attributeValue="Y" activeAttribute="Y" comment="Use Address Verification"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" attributeValue="Y" activeAttribute="Y" comment="Require CVV2 Verification"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize Payments (if set to N will auto-capture)"/> <ProductStoreGatewaySetting productStoreId="9000" gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" attributeValue="true" activeAttribute="Y" comment="Set to false to not transmit anything "/> Once we have it into the DB it could be extended in a custom components (hot-deploy) and it could be cashed and it could be no more necessary to restart OFBiz once you have to change a value into this property file. I have also moved those parameters at product store level so you could have different configuration by product store. It's only an idea and it could be introduced also after that new OFBiz release has been created. Any ideas and suggestions are welcomed because if it's working correctly for everyone it could be extended also to others property files (shipment.properties, catalog.properties, ...). Thanks in advance Marco |
+1 - this is one of many of these types of things that would be great if we moved to the db. Not sure of the entities at this point, but I'm all for the change.
Cheers, Tim -- Tim Ruppert HotWax Media http://www.hotwaxmedia.com o:801.649.6594 f:801.649.6595 ----- [hidden email] wrote: > Hi to all, > > what did you think if we move the payment.properties to an entity ? > I tried to having a more general entity but I have seen that every > single payment gateway having different parameters and so I tried with > the following example: > > <EnumerationType description="Payment Gateway Code" > enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> > <Enumeration description="Gift Certificate" enumCode="GIFTCERTIFICATE" > enumId="PGW_GIFTCERTIFICATE" sequenceId="01" enumTypeId="PGW_CODE"/> > <Enumeration description="CyberSource" enumCode="CYBERSOURCE" > enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> > <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" > enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> > <Enumeration description="ValueLink" enumCode="VALUELINK" > enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> > <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" > enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> > <Enumeration description="WorldPay" enumCode="WORLDPAY" > enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> > <Enumeration description="PayPal" enumCode="PAYPAL" > enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> > <Enumeration description="PCCharge" enumCode="PCCHARGE" > enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> > <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" > sequenceId="09" enumTypeId="PGW_CODE"/> > <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" > enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> > > <!-- Product store gateway setting --> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" > attributeValue="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > activeAttribute="Y" comment="Path the the VeriSign Certificate"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" > attributeValue="test-payflow.verisign.com" activeAttribute="Y" > comment="Address of the payment processor"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" > attributeValue="443" activeAttribute="Y" comment="Port of the payment > processor"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" > attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow account > information (Vendor)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="user" > attributeValue="[PayFlow UserID]" activeAttribute="Y" comment="Payflow > account information (PayFlow UserID)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" > attributeValue="[PayFlow Password]" activeAttribute="Y" > comment="Payflow account information (PayFlow Password)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" > attributeValue="[PayFlow Partner]" activeAttribute="Y" > comment="Payflow account information (PayFlow Partner)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" attributeValue="Y" > activeAttribute="Y" comment="Use Address Verification"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" > attributeValue="Y" activeAttribute="Y" comment="Require CVV2 > Verification"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" attributeValue="Y" > activeAttribute="Y" comment="Pre-Authorize Payments (if set to N will > auto-capture)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" > attributeValue="true" activeAttribute="Y" comment="Set to false to not > transmit anything "/> > > > Once we have it into the DB it could be extended in a custom > components (hot-deploy) and it could be cashed and it could be no more > necessary to restart OFBiz once you have to change a value into this > property file. > I have also moved those parameters at product store level so you could > have different configuration by product store. > > It's only an idea and it could be introduced also after that new OFBiz > release has been created. > > Any ideas and suggestions are welcomed because if it's working > correctly for everyone it could be extended also to others property > files (shipment.properties, catalog.properties, ...). > > Thanks in advance > Marco |
In reply to this post by mrisaliti@libero.it
This has been discussed a few times and I think is on a few of the lists around were people have brainstormed on things they'd like to add/change/etc. I'm personally very in favor of it and I do believe it has been needed for a long time. As for the design, I'm very against the concept of super-generic entities like this. They cause all sorts of problems, and I wish now that I had never even introduced the extensibility stuff (attribute tables and such) as they tend to make things messy and difficult to follow and maintain... if/when they are used. It won't be too difficult to add fields and entities for each property in the files. With actual entities and fields generic maintenance can be done through the Entity Data Maintenance pages, and for more user friendly stuff we'd want a less generic UI anyway, and it's a lot easier to implement that specific entities instead of generic ones. For example, we would create a PaymentGatewayConfig entity and entities that extend it where needed for Cybersource, PayflowPro, PayPal, etc, etc. The main change is that on the ProductStorePaymentSetting entity instead of using the "paymentPropertiesPath" field we would add a paymentGatewayConfigId that points to the corresponding PaymentGatewayConfig entity. That entity would have a type field, with different values for different payment gateways (ie CyberSource, PayflowPro, etc). Each property in the payment.properties file would be mapped to a field on one of these entities. Does that make sense? -David On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: > Hi to all, > > what did you think if we move the payment.properties to an entity ? > I tried to having a more general entity but I have seen that every > single payment gateway having different parameters and so I tried > with the following example: > > <EnumerationType description="Payment Gateway Code" > enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> > <Enumeration description="Gift Certificate" > enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" > sequenceId="01" enumTypeId="PGW_CODE"/> > <Enumeration description="CyberSource" enumCode="CYBERSOURCE" > enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> > <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" > enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> > <Enumeration description="ValueLink" enumCode="VALUELINK" > enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> > <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" > enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> > <Enumeration description="WorldPay" enumCode="WORLDPAY" > enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> > <Enumeration description="PayPal" enumCode="PAYPAL" > enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> > <Enumeration description="PCCharge" enumCode="PCCHARGE" > enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> > <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" > sequenceId="09" enumTypeId="PGW_CODE"/> > <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" > enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> > > <!-- Product store gateway setting --> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" > attributeValue="${sys:getProperty('ofbiz.home')}/applications/ > accounting/pfcerts" activeAttribute="Y" comment="Path the the > VeriSign Certificate"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" > attributeValue="test-payflow.verisign.com" activeAttribute="Y" > comment="Address of the payment processor"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" > attributeValue="443" activeAttribute="Y" comment="Port of the > payment processor"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" > attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow > account information (Vendor)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="user" > attributeValue="[PayFlow UserID]" activeAttribute="Y" > comment="Payflow account information (PayFlow UserID)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" > attributeValue="[PayFlow Password]" activeAttribute="Y" > comment="Payflow account information (PayFlow Password)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" > attributeValue="[PayFlow Partner]" activeAttribute="Y" > comment="Payflow account information (PayFlow Partner)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" > attributeValue="Y" activeAttribute="Y" comment="Use Address > Verification"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" > attributeValue="Y" activeAttribute="Y" comment="Require CVV2 > Verification"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" > attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize > Payments (if set to N will auto-capture)"/> > <ProductStoreGatewaySetting productStoreId="9000" > gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" > attributeValue="true" activeAttribute="Y" comment="Set to false to > not transmit anything "/> > > > Once we have it into the DB it could be extended in a custom > components (hot-deploy) and it could be cashed and it could be no > more necessary to restart OFBiz once you have to change a value into > this property file. > I have also moved those parameters at product store level so you > could have different configuration by product store. > > It's only an idea and it could be introduced also after that new > OFBiz release has been created. > > Any ideas and suggestions are welcomed because if it's working > correctly for everyone it could be extended also to others property > files (shipment.properties, catalog.properties, ...). > > Thanks in advance > Marco > |
David E Jones wrote:
> > This has been discussed a few times and I think is on a few of the lists > around were people have brainstormed on things they'd like to > add/change/etc. I'm personally very in favor of it and I do believe it > has been needed for a long time. Why not add support in the entity engine for proper entity extension? What I mean, is like the case for Party/Person/PartyGroup. Instead of having to fetch/update/etc each of those entities separately, the entity engine will treat the sub-tables as one, and deal with a single entity during manipulation. If a developer asks for a Party, they will actually get a Person/PartyGroup, with all the correct fields. If they ask for a person, they will either get the wanted value, or maybe a CCE if it is the other type. I've had thoughts about this for a while, but never concrete enough to turn into code. I'm mostly just dumping my brainstorming onto the list. Anyone else have any thoughts? |
On Mar 30, 2009, at 9:38 PM, Adam Heath wrote: > David E Jones wrote: >> >> This has been discussed a few times and I think is on a few of the >> lists >> around were people have brainstormed on things they'd like to >> add/change/etc. I'm personally very in favor of it and I do believe >> it >> has been needed for a long time. > > Why not add support in the entity engine for proper entity extension? > What I mean, is like the case for Party/Person/PartyGroup. Instead > of having to fetch/update/etc each of those entities separately, the > entity engine will treat the sub-tables as one, and deal with a single > entity during manipulation. > > If a developer asks for a Party, they will actually get a > Person/PartyGroup, with all the correct fields. If they ask for a > person, they will either get the wanted value, or maybe a CCE if it is > the other type. > > I've had thoughts about this for a while, but never concrete enough to > turn into code. I'm mostly just dumping my brainstorming onto the > list. Anyone else have any thoughts? I thought about this a bit early on in the design of the entity engine. It is one of the reasons why the PartyType entity has a tableName field, and one of the early possible uses of the relation(ship) stuff. The problem is that the higher level code knows about how the entities fit together and what things mean (because the programmer knows what they mean), so they can create view-entity defs and such and use them as needed for the application. The trick is to get the entity engine to do the same... ie do things in more efficient queries so there it doesn't have to do multiple calls to the database (ie get the Party, look at the partyTypeId, then get the corresponding info). It could do fully inclusive left-joins (ie including all other entities with a certain relationship type, or that are type one with the same pk field(s)) to get everything available and then figure it out after the query is done. Anyway, I suppose it could be done... the code would still have to look at the type or something to see which fields are available... interesting to think about anyway... -David |
In reply to this post by mrisaliti@libero.it
Hi David,
thanks a lot for your great analysis help on this, I have now understood what you mean after trying those new entities. Also I prefer now to implement those specific entities instead of generic ones. If I understood correctly it could be something similar to the following examples: <entity entity-name="PaymentGatewayConfig" package-name="org.ofbiz.accounting.payment" title="Payment Gateway Configuration"> <field name="paymentGatewayConfigId" type="id-ne"></field> <field name="paymentGatewayTypeId" type="id-ne"></field> <field name="description" type="very-long"></field> <prim-key field="paymentGatewayConfigId"/> <relation type="one" fk-name="PGC_ENUM" rel-entity-name="Enumeration"> <key-map field-name="paymentGatewayTypeId" rel-field-name="enumId"/> </relation> </entity> <entity entity-name="PayflowPro" package-name="org.ofbiz.accounting.payment" title="Payflow Pro Payment Gateway Configuration"> <field name="payflowProId" type="id-ne"></field> <field name="paymentGatewayConfigId" type="id-ne"></field> <field name="certsPath" type="value"><description>Path the the VeriSign Certificate</description></field> <field name="hostAddress" type="value"><description>Address of the payment processor</description></field> <field name="hostPort" type="numeric"><description>Port of the payment processor</description></field> <field name="vendor" type="short-varchar"><description>Vendor of account information</description></field> <field name="userId" type="short-varchar"><description>PayFlow UserID of account information</description></field> <field name="pwd" type="short-varchar"><description>PayFlow Password of account information</description></field> <field name="partner" type="short-varchar"><description>PayFlow Partner of account information</description></field> <field name="checkAvs" type="indicator"><description>Use Address Verification</description></field> <field name="checkCvv2" type="indicator"><description>Require CVV2 Verification</description></field> <field name="preAuth" type="indicator"><description>Pre-Authorize Payments (if set to N will auto-capture)</description></field> <field name="enableTransmit" type="indicator"><description>Set to N to not transmit anything</description></field> <prim-key field="payflowProId"/> <relation type="one" fk-name="PFP_PGC" rel-entity-name="PaymentGatewayConfig"> <key-map field-name="paymentGatewayConfigId"/> </relation> </entity> <entity entity-name="ProductStorePaymentSetting" package-name="org.ofbiz.product.store" title="Product Store Payment Settings Entity"> <field name="productStoreId" type="id-ne"></field> <field name="paymentMethodTypeId" type="id-ne"></field> <field name="paymentServiceTypeEnumId" type="id-ne"></field> <field name="paymentService" type="value"></field> <field name="paymentGatewayConfigId" type="id-ne"></field> <field name="paymentPropertiesPath" type="value"></field> <field name="applyToAllProducts" type="indicator"></field> <prim-key field="productStoreId"/> <prim-key field="paymentMethodTypeId"/> <prim-key field="paymentServiceTypeEnumId"/> <relation type="one" fk-name="PRDS_PS_PRDS" rel-entity-name="ProductStore"> <key-map field-name="productStoreId"/> </relation> <relation type="one" fk-name="PRDS_PS_PMNTTP" rel-entity-name="PaymentMethodType"> <key-map field-name="paymentMethodTypeId"/> </relation> <relation type="one" fk-name="PRDS_PS_ENUM" rel-entity-name="Enumeration"> <key-map field-name="paymentServiceTypeEnumId" rel-field-name="enumId"/> </relation> <relation type="one" fk-name="PRDS_PS_PGC" rel-entity-name="PaymentGatewayConfig"> <key-map field-name="paymentGatewayConfigId"/> </relation> </entity> This is an example of Payflow Pro Payment Gateway configuration: <entity-engine-xml> <PaymentMethodType description="Payflow Pro" paymentMethodTypeId="EXT_PAYFLOW"/> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" description="Payment Gateway"/> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for production"/> <PayflowPro payflowProId="PAYFLOW_TEST" paymentGatewayConfigId="PAYFLOW_TEST" certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" hostAddress="test-payflow.verisign.com" hostPort="443" vendor="TestVendor" userId="TestUserID" pwd="TestPassword" partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> <PayflowPro payflowProId="PAYFLOW_PROD" paymentGatewayConfigId="PAYFLOW_PROD" certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" hostAddress="payflow.verisign.com" hostPort="443" vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="EXT_PAYFLOW" paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" applyToAllProducts=""/> </entity-engine-xml> In this way we could handle also different configuration per database (test/production/...) and product stores. Idea and suggestions are welcome. Thanks a lot Marco > > This has been discussed a few times and I think is on a few of the > lists around were people have brainstormed on things they'd like to > add/change/etc. I'm personally very in favor of it and I do believe it > has been needed for a long time. > > As for the design, I'm very against the concept of super-generic > entities like this. They cause all sorts of problems, and I wish now > that I had never even introduced the extensibility stuff (attribute > tables and such) as they tend to make things messy and difficult to > follow and maintain... if/when they are used. > > It won't be too difficult to add fields and entities for each property > in the files. With actual entities and fields generic maintenance can > be done through the Entity Data Maintenance pages, and for more user > friendly stuff we'd want a less generic UI anyway, and it's a lot > easier to implement that specific entities instead of generic ones. > > For example, we would create a PaymentGatewayConfig entity and > entities that extend it where needed for Cybersource, PayflowPro, > PayPal, etc, etc. The main change is that on the > ProductStorePaymentSetting entity instead of using the > "paymentPropertiesPath" field we would add a paymentGatewayConfigId > that points to the corresponding PaymentGatewayConfig entity. That > entity would have a type field, with different values for different > payment gateways (ie CyberSource, PayflowPro, etc). > > Each property in the payment.properties file would be mapped to a > field on one of these entities. > > Does that make sense? > > -David > > > > On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: > > > Hi to all, > > > > what did you think if we move the payment.properties to an entity ? > > I tried to having a more general entity but I have seen that every > > single payment gateway having different parameters and so I tried > > with the following example: > > > > <EnumerationType description="Payment Gateway Code" > > enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> > > <Enumeration description="Gift Certificate" > > enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" > > sequenceId="01" enumTypeId="PGW_CODE"/> > > <Enumeration description="CyberSource" enumCode="CYBERSOURCE" > > enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> > > <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" > > enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> > > <Enumeration description="ValueLink" enumCode="VALUELINK" > > enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> > > <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" > > enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> > > <Enumeration description="WorldPay" enumCode="WORLDPAY" > > enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> > > <Enumeration description="PayPal" enumCode="PAYPAL" > > enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> > > <Enumeration description="PCCharge" enumCode="PCCHARGE" > > enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> > > <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" > > sequenceId="09" enumTypeId="PGW_CODE"/> > > <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" > > enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> > > > > <!-- Product store gateway setting --> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" > > attributeValue="${sys:getProperty('ofbiz.home')}/applications/ > > accounting/pfcerts" activeAttribute="Y" comment="Path the the > > VeriSign Certificate"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" > > attributeValue="test-payflow.verisign.com" activeAttribute="Y" > > comment="Address of the payment processor"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" > > attributeValue="443" activeAttribute="Y" comment="Port of the > > payment processor"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" > > attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow > > account information (Vendor)"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="user" > > attributeValue="[PayFlow UserID]" activeAttribute="Y" > > comment="Payflow account information (PayFlow UserID)"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" > > attributeValue="[PayFlow Password]" activeAttribute="Y" > > comment="Payflow account information (PayFlow Password)"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" > > attributeValue="[PayFlow Partner]" activeAttribute="Y" > > comment="Payflow account information (PayFlow Partner)"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" > > attributeValue="Y" activeAttribute="Y" comment="Use Address > > Verification"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" > > attributeValue="Y" activeAttribute="Y" comment="Require CVV2 > > Verification"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" > > attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize > > Payments (if set to N will auto-capture)"/> > > <ProductStoreGatewaySetting productStoreId="9000" > > gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" > > attributeValue="true" activeAttribute="Y" comment="Set to false to > > not transmit anything "/> > > > > > > Once we have it into the DB it could be extended in a custom > > components (hot-deploy) and it could be cashed and it could be no > > more necessary to restart OFBiz once you have to change a value into > > this property file. > > I have also moved those parameters at product store level so you > > could have different configuration by product store. > > > > It's only an idea and it could be introduced also after that new > > OFBiz release has been created. > > > > Any ideas and suggestions are welcomed because if it's working > > correctly for everyone it could be extended also to others property > > files (shipment.properties, catalog.properties, ...). > > > > Thanks in advance > > Marco > > > > |
Anyway I made I mistake in the above example because Payflow Pro is a
credit card payment gateway and so it's not necessary a new payment method type (EXT_PAYFLOW). So the corrected example is the following: <entity-engine-xml> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" description="Payment Gateway"/> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for production"/> <PayflowPro payflowProId="PAYFLOW_TEST" paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" hostAddress="test-payflow.verisign.com" hostPort="443" vendor="TestVendor" userId="TestUserID" pwd="TestPassword" partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> <PayflowPro payflowProId="PAYFLOW_PROD" paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" hostAddress="payflow.verisign.com" hostPort="443" vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> <ProductStorePaymentSetting productStoreId="9000" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="payflowCCProcessor" paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" applyToAllProducts=""/> </entity-engine-xml> Thanks Marco Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha scritto: > Hi David, > > thanks a lot for your great analysis help on this, I have now > understood what you mean after trying those new entities. > Also I prefer now to implement those specific entities instead of > generic ones. > > If I understood correctly it could be something similar to the > following examples: > > <entity entity-name="PaymentGatewayConfig" > package-name="org.ofbiz.accounting.payment" > title="Payment Gateway Configuration"> > <field name="paymentGatewayConfigId" type="id-ne"></field> > <field name="paymentGatewayTypeId" type="id-ne"></field> > <field name="description" type="very-long"></field> > <prim-key field="paymentGatewayConfigId"/> > <relation type="one" fk-name="PGC_ENUM" rel-entity- > name="Enumeration"> > <key-map field-name="paymentGatewayTypeId" rel-field- > name="enumId"/> > </relation> > </entity> > <entity entity-name="PayflowPro" > package-name="org.ofbiz.accounting.payment" > title="Payflow Pro Payment Gateway Configuration"> > <field name="payflowProId" type="id-ne"></field> > <field name="paymentGatewayConfigId" type="id-ne"></field> > <field name="certsPath" type="value"><description>Path the the > VeriSign Certificate</description></field> > <field name="hostAddress" type="value"><description>Address of > the payment processor</description></field> > <field name="hostPort" type="numeric"><description>Port of the > payment processor</description></field> > <field name="vendor" type="short-varchar"><description>Vendor of > account information</description></field> > <field name="userId" type="short-varchar"><description>PayFlow > UserID of account information</description></field> > <field name="pwd" type="short-varchar"><description>PayFlow > Password of account information</description></field> > <field name="partner" type="short-varchar"><description>PayFlow > Partner of account information</description></field> > <field name="checkAvs" type="indicator"><description>Use Address > Verification</description></field> > <field name="checkCvv2" type="indicator"><description>Require > CVV2 Verification</description></field> > <field name="preAuth" type="indicator"><description>Pre-Authorize > Payments (if set to N will auto-capture)</description></field> > <field name="enableTransmit" type="indicator"><description>Set to > N to not transmit anything</description></field> > <prim-key field="payflowProId"/> > <relation type="one" fk-name="PFP_PGC" rel-entity- > name="PaymentGatewayConfig"> > <key-map field-name="paymentGatewayConfigId"/> > </relation> > </entity> > <entity entity-name="ProductStorePaymentSetting" > package-name="org.ofbiz.product.store" > title="Product Store Payment Settings Entity"> > <field name="productStoreId" type="id-ne"></field> > <field name="paymentMethodTypeId" type="id-ne"></field> > <field name="paymentServiceTypeEnumId" type="id-ne"></field> > <field name="paymentService" type="value"></field> > <field name="paymentGatewayConfigId" type="id-ne"></field> > <field name="paymentPropertiesPath" type="value"></field> > <field name="applyToAllProducts" type="indicator"></field> > <prim-key field="productStoreId"/> > <prim-key field="paymentMethodTypeId"/> > <prim-key field="paymentServiceTypeEnumId"/> > <relation type="one" fk-name="PRDS_PS_PRDS" rel-entity- > name="ProductStore"> > <key-map field-name="productStoreId"/> > </relation> > <relation type="one" fk-name="PRDS_PS_PMNTTP" rel-entity- > name="PaymentMethodType"> > <key-map field-name="paymentMethodTypeId"/> > </relation> > <relation type="one" fk-name="PRDS_PS_ENUM" rel-entity- > name="Enumeration"> > <key-map field-name="paymentServiceTypeEnumId" rel-field- > name="enumId"/> > </relation> > <relation type="one" fk-name="PRDS_PS_PGC" rel-entity- > name="PaymentGatewayConfig"> > <key-map field-name="paymentGatewayConfigId"/> > </relation> > </entity> > > This is an example of Payflow Pro Payment Gateway configuration: > > <entity-engine-xml> > <PaymentMethodType description="Payflow Pro" > paymentMethodTypeId="EXT_PAYFLOW"/> > <EnumerationType enumTypeId="PGW_CODE" hasTable="N" > description="Payment Gateway"/> > > <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" > enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> > > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > production"/> > > <PayflowPro payflowProId="PAYFLOW_TEST" > paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ > {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="test-payflow.verisign.com" hostPort="443" > vendor="TestVendor" userId="TestUserID" pwd="TestPassword" > partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > enableTransmit="Y"/> > <PayflowPro payflowProId="PAYFLOW_PROD" > paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ > {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="payflow.verisign.com" hostPort="443" > vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" > partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > enableTransmit="Y"/> > > <ProductStorePaymentSetting productStoreId="9000" > paymentMethodTypeId="EXT_PAYFLOW" > paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" > paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" > applyToAllProducts=""/> > </entity-engine-xml> > > In this way we could handle also different configuration per > database (test/production/...) and product stores. > > Idea and suggestions are welcome. > > Thanks a lot > Marco > > > > > > > > > >> >> This has been discussed a few times and I think is on a few of the >> lists around were people have brainstormed on things they'd like to >> add/change/etc. I'm personally very in favor of it and I do believe >> it >> has been needed for a long time. >> >> As for the design, I'm very against the concept of super-generic >> entities like this. They cause all sorts of problems, and I wish now >> that I had never even introduced the extensibility stuff (attribute >> tables and such) as they tend to make things messy and difficult to >> follow and maintain... if/when they are used. >> >> It won't be too difficult to add fields and entities for each >> property >> in the files. With actual entities and fields generic maintenance can >> be done through the Entity Data Maintenance pages, and for more user >> friendly stuff we'd want a less generic UI anyway, and it's a lot >> easier to implement that specific entities instead of generic ones. >> >> For example, we would create a PaymentGatewayConfig entity and >> entities that extend it where needed for Cybersource, PayflowPro, >> PayPal, etc, etc. The main change is that on the >> ProductStorePaymentSetting entity instead of using the >> "paymentPropertiesPath" field we would add a paymentGatewayConfigId >> that points to the corresponding PaymentGatewayConfig entity. That >> entity would have a type field, with different values for different >> payment gateways (ie CyberSource, PayflowPro, etc). >> >> Each property in the payment.properties file would be mapped to a >> field on one of these entities. >> >> Does that make sense? >> >> -David >> >> >> >> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: >> >>> Hi to all, >>> >>> what did you think if we move the payment.properties to an entity ? >>> I tried to having a more general entity but I have seen that every >>> single payment gateway having different parameters and so I tried >>> with the following example: >>> >>> <EnumerationType description="Payment Gateway Code" >>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> >>> <Enumeration description="Gift Certificate" >>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" >>> sequenceId="01" enumTypeId="PGW_CODE"/> >>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" >>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> >>> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" >>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> >>> <Enumeration description="ValueLink" enumCode="VALUELINK" >>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> >>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" >>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> >>> <Enumeration description="WorldPay" enumCode="WORLDPAY" >>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> >>> <Enumeration description="PayPal" enumCode="PAYPAL" >>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> >>> <Enumeration description="PCCharge" enumCode="PCCHARGE" >>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> >>> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" >>> sequenceId="09" enumTypeId="PGW_CODE"/> >>> <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" >>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> >>> >>> <!-- Product store gateway setting --> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" >>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ >>> accounting/pfcerts" activeAttribute="Y" comment="Path the the >>> VeriSign Certificate"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" >>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" >>> comment="Address of the payment processor"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" >>> attributeValue="443" activeAttribute="Y" comment="Port of the >>> payment processor"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" >>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow >>> account information (Vendor)"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" >>> attributeValue="[PayFlow UserID]" activeAttribute="Y" >>> comment="Payflow account information (PayFlow UserID)"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" >>> attributeValue="[PayFlow Password]" activeAttribute="Y" >>> comment="Payflow account information (PayFlow Password)"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" >>> attributeValue="[PayFlow Partner]" activeAttribute="Y" >>> comment="Payflow account information (PayFlow Partner)"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" >>> attributeValue="Y" activeAttribute="Y" comment="Use Address >>> Verification"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" >>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 >>> Verification"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" >>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize >>> Payments (if set to N will auto-capture)"/> >>> <ProductStoreGatewaySetting productStoreId="9000" >>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" >>> attributeValue="true" activeAttribute="Y" comment="Set to false to >>> not transmit anything "/> >>> >>> >>> Once we have it into the DB it could be extended in a custom >>> components (hot-deploy) and it could be cashed and it could be no >>> more necessary to restart OFBiz once you have to change a value into >>> this property file. >>> I have also moved those parameters at product store level so you >>> could have different configuration by product store. >>> >>> It's only an idea and it could be introduced also after that new >>> OFBiz release has been created. >>> >>> Any ideas and suggestions are welcomed because if it's working >>> correctly for everyone it could be extended also to others property >>> files (shipment.properties, catalog.properties, ...). >>> >>> Thanks in advance >>> Marco >>> >> >> > |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 I am wondering how a PCI audit might view having certificates and login info in a database. I know that securing the database is one option. there has been a effort to beef up security through ofbiz. Just something to consider. I have no info one way or the other. Marco Risaliti sent the following on 3/31/2009 10:17 AM: > Anyway I made I mistake in the above example because Payflow Pro is a > credit card payment gateway and so it's not necessary a new payment > method type (EXT_PAYFLOW). > So the corrected example is the following: > > <entity-engine-xml> > <EnumerationType enumTypeId="PGW_CODE" hasTable="N" > description="Payment Gateway"/> > > <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" > enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> > > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > production"/> > > <PayflowPro payflowProId="PAYFLOW_TEST" > paymentGatewayConfigId="PAYFLOW_TEST" > certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="test-payflow.verisign.com" hostPort="443" > vendor="TestVendor" userId="TestUserID" pwd="TestPassword" > partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > enableTransmit="Y"/> > <PayflowPro payflowProId="PAYFLOW_PROD" > paymentGatewayConfigId="PAYFLOW_PROD" > certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="payflow.verisign.com" hostPort="443" vendor="ProdVendor" > userId="ProdUserID" pwd="ProdPassword" partner="ProdPartner" > checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> > > <ProductStorePaymentSetting productStoreId="9000" > paymentMethodTypeId="CREDIT_CARD" > paymentServiceTypeEnumId="PRDS_PAY_AUTH" > paymentService="payflowCCProcessor" > paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" > applyToAllProducts=""/> > </entity-engine-xml> > > Thanks > Marco > > > Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha scritto: > >> Hi David, >> >> thanks a lot for your great analysis help on this, I have now >> understood what you mean after trying those new entities. >> Also I prefer now to implement those specific entities instead of >> generic ones. >> >> If I understood correctly it could be something similar to the >> following examples: >> >> <entity entity-name="PaymentGatewayConfig" >> package-name="org.ofbiz.accounting.payment" >> title="Payment Gateway Configuration"> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="paymentGatewayTypeId" type="id-ne"></field> >> <field name="description" type="very-long"></field> >> <prim-key field="paymentGatewayConfigId"/> >> <relation type="one" fk-name="PGC_ENUM" rel-entity-name="Enumeration"> >> <key-map field-name="paymentGatewayTypeId" rel-field-name="enumId"/> >> </relation> >> </entity> >> <entity entity-name="PayflowPro" >> package-name="org.ofbiz.accounting.payment" >> title="Payflow Pro Payment Gateway Configuration"> >> <field name="payflowProId" type="id-ne"></field> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="certsPath" type="value"><description>Path the the >> VeriSign Certificate</description></field> >> <field name="hostAddress" type="value"><description>Address of the >> payment processor</description></field> >> <field name="hostPort" type="numeric"><description>Port of the >> payment processor</description></field> >> <field name="vendor" type="short-varchar"><description>Vendor of >> account information</description></field> >> <field name="userId" type="short-varchar"><description>PayFlow >> UserID of account information</description></field> >> <field name="pwd" type="short-varchar"><description>PayFlow >> Password of account information</description></field> >> <field name="partner" type="short-varchar"><description>PayFlow >> Partner of account information</description></field> >> <field name="checkAvs" type="indicator"><description>Use Address >> Verification</description></field> >> <field name="checkCvv2" type="indicator"><description>Require CVV2 >> Verification</description></field> >> <field name="preAuth" type="indicator"><description>Pre-Authorize >> Payments (if set to N will auto-capture)</description></field> >> <field name="enableTransmit" type="indicator"><description>Set to N >> to not transmit anything</description></field> >> <prim-key field="payflowProId"/> >> <relation type="one" fk-name="PFP_PGC" >> rel-entity-name="PaymentGatewayConfig"> >> <key-map field-name="paymentGatewayConfigId"/> >> </relation> >> </entity> >> <entity entity-name="ProductStorePaymentSetting" >> package-name="org.ofbiz.product.store" >> title="Product Store Payment Settings Entity"> >> <field name="productStoreId" type="id-ne"></field> >> <field name="paymentMethodTypeId" type="id-ne"></field> >> <field name="paymentServiceTypeEnumId" type="id-ne"></field> >> <field name="paymentService" type="value"></field> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="paymentPropertiesPath" type="value"></field> >> <field name="applyToAllProducts" type="indicator"></field> >> <prim-key field="productStoreId"/> >> <prim-key field="paymentMethodTypeId"/> >> <prim-key field="paymentServiceTypeEnumId"/> >> <relation type="one" fk-name="PRDS_PS_PRDS" >> rel-entity-name="ProductStore"> >> <key-map field-name="productStoreId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_PMNTTP" >> rel-entity-name="PaymentMethodType"> >> <key-map field-name="paymentMethodTypeId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_ENUM" >> rel-entity-name="Enumeration"> >> <key-map field-name="paymentServiceTypeEnumId" >> rel-field-name="enumId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_PGC" >> rel-entity-name="PaymentGatewayConfig"> >> <key-map field-name="paymentGatewayConfigId"/> >> </relation> >> </entity> >> >> This is an example of Payflow Pro Payment Gateway configuration: >> >> <entity-engine-xml> >> <PaymentMethodType description="Payflow Pro" >> paymentMethodTypeId="EXT_PAYFLOW"/> >> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >> description="Payment Gateway"/> >> >> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >> >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >> production"/> >> >> <PayflowPro payflowProId="PAYFLOW_TEST" >> paymentGatewayConfigId="PAYFLOW_TEST" >> certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >> hostAddress="test-payflow.verisign.com" hostPort="443" >> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >> enableTransmit="Y"/> >> <PayflowPro payflowProId="PAYFLOW_PROD" >> paymentGatewayConfigId="PAYFLOW_PROD" >> certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >> hostAddress="payflow.verisign.com" hostPort="443" vendor="ProdVendor" >> userId="ProdUserID" pwd="ProdPassword" partner="ProdPartner" >> checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> >> >> <ProductStorePaymentSetting productStoreId="9000" >> paymentMethodTypeId="EXT_PAYFLOW" >> paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" >> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >> applyToAllProducts=""/> >> </entity-engine-xml> >> >> In this way we could handle also different configuration per database >> (test/production/...) and product stores. >> >> Idea and suggestions are welcome. >> >> Thanks a lot >> Marco >> >> >> >> >> >> >> >> >> >>> >>> This has been discussed a few times and I think is on a few of the >>> lists around were people have brainstormed on things they'd like to >>> add/change/etc. I'm personally very in favor of it and I do believe it >>> has been needed for a long time. >>> >>> As for the design, I'm very against the concept of super-generic >>> entities like this. They cause all sorts of problems, and I wish now >>> that I had never even introduced the extensibility stuff (attribute >>> tables and such) as they tend to make things messy and difficult to >>> follow and maintain... if/when they are used. >>> >>> It won't be too difficult to add fields and entities for each property >>> in the files. With actual entities and fields generic maintenance can >>> be done through the Entity Data Maintenance pages, and for more user >>> friendly stuff we'd want a less generic UI anyway, and it's a lot >>> easier to implement that specific entities instead of generic ones. >>> >>> For example, we would create a PaymentGatewayConfig entity and >>> entities that extend it where needed for Cybersource, PayflowPro, >>> PayPal, etc, etc. The main change is that on the >>> ProductStorePaymentSetting entity instead of using the >>> "paymentPropertiesPath" field we would add a paymentGatewayConfigId >>> that points to the corresponding PaymentGatewayConfig entity. That >>> entity would have a type field, with different values for different >>> payment gateways (ie CyberSource, PayflowPro, etc). >>> >>> Each property in the payment.properties file would be mapped to a >>> field on one of these entities. >>> >>> Does that make sense? >>> >>> -David >>> >>> >>> >>> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: >>> >>>> Hi to all, >>>> >>>> what did you think if we move the payment.properties to an entity ? >>>> I tried to having a more general entity but I have seen that every >>>> single payment gateway having different parameters and so I tried >>>> with the following example: >>>> >>>> <EnumerationType description="Payment Gateway Code" >>>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> >>>> <Enumeration description="Gift Certificate" >>>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" >>>> sequenceId="01" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" >>>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" >>>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="ValueLink" enumCode="VALUELINK" >>>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" >>>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="WorldPay" enumCode="WORLDPAY" >>>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PayPal" enumCode="PAYPAL" >>>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PCCharge" enumCode="PCCHARGE" >>>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" >>>> sequenceId="09" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" >>>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> >>>> >>>> <!-- Product store gateway setting --> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" >>>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ >>>> accounting/pfcerts" activeAttribute="Y" comment="Path the the >>>> VeriSign Certificate"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" >>>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" >>>> comment="Address of the payment processor"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" >>>> attributeValue="443" activeAttribute="Y" comment="Port of the >>>> payment processor"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" >>>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow >>>> account information (Vendor)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" >>>> attributeValue="[PayFlow UserID]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow UserID)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" >>>> attributeValue="[PayFlow Password]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow Password)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" >>>> attributeValue="[PayFlow Partner]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow Partner)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" >>>> attributeValue="Y" activeAttribute="Y" comment="Use Address >>>> Verification"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" >>>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 >>>> Verification"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" >>>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize >>>> Payments (if set to N will auto-capture)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" >>>> attributeValue="true" activeAttribute="Y" comment="Set to false to >>>> not transmit anything "/> >>>> >>>> >>>> Once we have it into the DB it could be extended in a custom >>>> components (hot-deploy) and it could be cashed and it could be no >>>> more necessary to restart OFBiz once you have to change a value into >>>> this property file. >>>> I have also moved those parameters at product store level so you >>>> could have different configuration by product store. >>>> >>>> It's only an idea and it could be introduced also after that new >>>> OFBiz release has been created. >>>> >>>> Any ideas and suggestions are welcomed because if it's working >>>> correctly for everyone it could be extended also to others property >>>> files (shipment.properties, catalog.properties, ...). >>>> >>>> Thanks in advance >>>> Marco >>>> >>> >>> >> > > > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ0nCCrP3NbaWWqE4RAoszAJ9lvTNyKRAi2pSI38S9Av9fK9WYswCePSQZ UkRVxt/EnPkvg/+pJJQA1Z8= =U4ce -----END PGP SIGNATURE----- |
In reply to this post by mrisaliti@libero.it
Yes, this looks much better Marco, and is just the direction I was trying to communicate. There are a few things you could do to clarify the structure, and make it more consistent with other sets of entities that are using the type/ etc pattern: 1. make a PaymentGatewayConfigType entity instead of using Enumeration; the extra table isn't too big a deal, and other entities (like Party/Person/PartyGroup, ContactMech/TelecomNumber/PostalAddress/ etc, etc) do this as part of a shared PK pattern; also in general if the field pointed to the Enumeration entity it should always have the suffic "EnumId" for clarity, but that doesn't matter since the Type entity is a better way to go 2. to be an extension of the PaymentGatewayConfig entity, the PayflowPro entity should have the same pk as it (just like Person and PartyGroup have the partyId for their only pk field), ie it should just have the paymentGatewayConfigId field as the primary key instead of the payflowProId; the reason for this is we want a one-to-one relationship between the two entities... we don't want multiple PayflowPro records for a single PaymentGatewayConfig record Anyway, looks good and it's great to have someone working on this! -David On Mar 31, 2009, at 11:17 AM, Marco Risaliti wrote: > Anyway I made I mistake in the above example because Payflow Pro is > a credit card payment gateway and so it's not necessary a new > payment method type (EXT_PAYFLOW). > So the corrected example is the following: > > <entity-engine-xml> > <EnumerationType enumTypeId="PGW_CODE" hasTable="N" > description="Payment Gateway"/> > > <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" > enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> > > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > production"/> > > <PayflowPro payflowProId="PAYFLOW_TEST" > paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ > {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="test-payflow.verisign.com" hostPort="443" > vendor="TestVendor" userId="TestUserID" pwd="TestPassword" > partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > enableTransmit="Y"/> > <PayflowPro payflowProId="PAYFLOW_PROD" > paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ > {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="payflow.verisign.com" hostPort="443" > vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" > partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > enableTransmit="Y"/> > > <ProductStorePaymentSetting productStoreId="9000" > paymentMethodTypeId="CREDIT_CARD" > paymentServiceTypeEnumId="PRDS_PAY_AUTH" > paymentService="payflowCCProcessor" > paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" > applyToAllProducts=""/> > </entity-engine-xml> > > Thanks > Marco > > > Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha scritto: > >> Hi David, >> >> thanks a lot for your great analysis help on this, I have now >> understood what you mean after trying those new entities. >> Also I prefer now to implement those specific entities instead of >> generic ones. >> >> If I understood correctly it could be something similar to the >> following examples: >> >> <entity entity-name="PaymentGatewayConfig" >> package-name="org.ofbiz.accounting.payment" >> title="Payment Gateway Configuration"> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="paymentGatewayTypeId" type="id-ne"></field> >> <field name="description" type="very-long"></field> >> <prim-key field="paymentGatewayConfigId"/> >> <relation type="one" fk-name="PGC_ENUM" rel-entity- >> name="Enumeration"> >> <key-map field-name="paymentGatewayTypeId" rel-field- >> name="enumId"/> >> </relation> >> </entity> >> <entity entity-name="PayflowPro" >> package-name="org.ofbiz.accounting.payment" >> title="Payflow Pro Payment Gateway Configuration"> >> <field name="payflowProId" type="id-ne"></field> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="certsPath" type="value"><description>Path the the >> VeriSign Certificate</description></field> >> <field name="hostAddress" type="value"><description>Address of >> the payment processor</description></field> >> <field name="hostPort" type="numeric"><description>Port of the >> payment processor</description></field> >> <field name="vendor" type="short-varchar"><description>Vendor of >> account information</description></field> >> <field name="userId" type="short-varchar"><description>PayFlow >> UserID of account information</description></field> >> <field name="pwd" type="short-varchar"><description>PayFlow >> Password of account information</description></field> >> <field name="partner" type="short-varchar"><description>PayFlow >> Partner of account information</description></field> >> <field name="checkAvs" type="indicator"><description>Use Address >> Verification</description></field> >> <field name="checkCvv2" type="indicator"><description>Require >> CVV2 Verification</description></field> >> <field name="preAuth" type="indicator"><description>Pre-Authorize >> Payments (if set to N will auto-capture)</description></field> >> <field name="enableTransmit" type="indicator"><description>Set to >> N to not transmit anything</description></field> >> <prim-key field="payflowProId"/> >> <relation type="one" fk-name="PFP_PGC" rel-entity- >> name="PaymentGatewayConfig"> >> <key-map field-name="paymentGatewayConfigId"/> >> </relation> >> </entity> >> <entity entity-name="ProductStorePaymentSetting" >> package-name="org.ofbiz.product.store" >> title="Product Store Payment Settings Entity"> >> <field name="productStoreId" type="id-ne"></field> >> <field name="paymentMethodTypeId" type="id-ne"></field> >> <field name="paymentServiceTypeEnumId" type="id-ne"></field> >> <field name="paymentService" type="value"></field> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="paymentPropertiesPath" type="value"></field> >> <field name="applyToAllProducts" type="indicator"></field> >> <prim-key field="productStoreId"/> >> <prim-key field="paymentMethodTypeId"/> >> <prim-key field="paymentServiceTypeEnumId"/> >> <relation type="one" fk-name="PRDS_PS_PRDS" rel-entity- >> name="ProductStore"> >> <key-map field-name="productStoreId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_PMNTTP" rel-entity- >> name="PaymentMethodType"> >> <key-map field-name="paymentMethodTypeId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_ENUM" rel-entity- >> name="Enumeration"> >> <key-map field-name="paymentServiceTypeEnumId" rel-field- >> name="enumId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_PGC" rel-entity- >> name="PaymentGatewayConfig"> >> <key-map field-name="paymentGatewayConfigId"/> >> </relation> >> </entity> >> >> This is an example of Payflow Pro Payment Gateway configuration: >> >> <entity-engine-xml> >> <PaymentMethodType description="Payflow Pro" >> paymentMethodTypeId="EXT_PAYFLOW"/> >> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >> description="Payment Gateway"/> >> >> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >> >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >> test"/> >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >> production"/> >> >> <PayflowPro payflowProId="PAYFLOW_TEST" >> paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ >> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >> hostAddress="test-payflow.verisign.com" hostPort="443" >> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >> enableTransmit="Y"/> >> <PayflowPro payflowProId="PAYFLOW_PROD" >> paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ >> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >> hostAddress="payflow.verisign.com" hostPort="443" >> vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" >> partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >> enableTransmit="Y"/> >> >> <ProductStorePaymentSetting productStoreId="9000" >> paymentMethodTypeId="EXT_PAYFLOW" >> paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" >> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >> applyToAllProducts=""/> >> </entity-engine-xml> >> >> In this way we could handle also different configuration per >> database (test/production/...) and product stores. >> >> Idea and suggestions are welcome. >> >> Thanks a lot >> Marco >> >> >> >> >> >> >> >> >> >>> >>> This has been discussed a few times and I think is on a few of the >>> lists around were people have brainstormed on things they'd like to >>> add/change/etc. I'm personally very in favor of it and I do >>> believe it >>> has been needed for a long time. >>> >>> As for the design, I'm very against the concept of super-generic >>> entities like this. They cause all sorts of problems, and I wish now >>> that I had never even introduced the extensibility stuff (attribute >>> tables and such) as they tend to make things messy and difficult to >>> follow and maintain... if/when they are used. >>> >>> It won't be too difficult to add fields and entities for each >>> property >>> in the files. With actual entities and fields generic maintenance >>> can >>> be done through the Entity Data Maintenance pages, and for more user >>> friendly stuff we'd want a less generic UI anyway, and it's a lot >>> easier to implement that specific entities instead of generic ones. >>> >>> For example, we would create a PaymentGatewayConfig entity and >>> entities that extend it where needed for Cybersource, PayflowPro, >>> PayPal, etc, etc. The main change is that on the >>> ProductStorePaymentSetting entity instead of using the >>> "paymentPropertiesPath" field we would add a paymentGatewayConfigId >>> that points to the corresponding PaymentGatewayConfig entity. That >>> entity would have a type field, with different values for different >>> payment gateways (ie CyberSource, PayflowPro, etc). >>> >>> Each property in the payment.properties file would be mapped to a >>> field on one of these entities. >>> >>> Does that make sense? >>> >>> -David >>> >>> >>> >>> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: >>> >>>> Hi to all, >>>> >>>> what did you think if we move the payment.properties to an entity ? >>>> I tried to having a more general entity but I have seen that every >>>> single payment gateway having different parameters and so I tried >>>> with the following example: >>>> >>>> <EnumerationType description="Payment Gateway Code" >>>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> >>>> <Enumeration description="Gift Certificate" >>>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" >>>> sequenceId="01" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" >>>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" >>>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="ValueLink" enumCode="VALUELINK" >>>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" >>>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="WorldPay" enumCode="WORLDPAY" >>>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PayPal" enumCode="PAYPAL" >>>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PCCharge" enumCode="PCCHARGE" >>>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" >>>> sequenceId="09" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" >>>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" >>>> enumTypeId="PGW_CODE"/> >>>> >>>> <!-- Product store gateway setting --> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" >>>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ >>>> accounting/pfcerts" activeAttribute="Y" comment="Path the the >>>> VeriSign Certificate"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" >>>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" >>>> comment="Address of the payment processor"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" >>>> attributeValue="443" activeAttribute="Y" comment="Port of the >>>> payment processor"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" >>>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow >>>> account information (Vendor)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" >>>> attributeValue="[PayFlow UserID]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow UserID)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" >>>> attributeValue="[PayFlow Password]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow Password)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" >>>> attributeValue="[PayFlow Partner]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow Partner)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" >>>> attributeValue="Y" activeAttribute="Y" comment="Use Address >>>> Verification"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" >>>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 >>>> Verification"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" >>>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize >>>> Payments (if set to N will auto-capture)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" >>>> attributeValue="true" activeAttribute="Y" comment="Set to false to >>>> not transmit anything "/> >>>> >>>> >>>> Once we have it into the DB it could be extended in a custom >>>> components (hot-deploy) and it could be cashed and it could be no >>>> more necessary to restart OFBiz once you have to change a value >>>> into >>>> this property file. >>>> I have also moved those parameters at product store level so you >>>> could have different configuration by product store. >>>> >>>> It's only an idea and it could be introduced also after that new >>>> OFBiz release has been created. >>>> >>>> Any ideas and suggestions are welcomed because if it's working >>>> correctly for everyone it could be extended also to others property >>>> files (shipment.properties, catalog.properties, ...). >>>> >>>> Thanks in advance >>>> Marco >>>> >>> >>> >> > |
In reply to this post by mrisaliti@libero.it
Ok, thanks a lot for those important clarification.
I will create a new JIRA issue and a patch for it as soon as I can. Antoher small question : did you think that it's better to have a PayflowPro entity or put a prefix before it (ex. PaymentGatewayPayflowPro, PaymentGatewayCyberSource, ...) ? So all the paymentGateway are grouped all together or we can simply use a specific package name for it (org.ofbiz.accounting.payment.gateway or ...) and leave the gateway name as entity name. Thanks Marco > > Yes, this looks much better Marco, and is just the direction I was > trying to communicate. > > There are a few things you could do to clarify the structure, and make > it more consistent with other sets of entities that are using the type/ > etc pattern: > > 1. make a PaymentGatewayConfigType entity instead of using > Enumeration; the extra table isn't too big a deal, and other entities > (like Party/Person/PartyGroup, ContactMech/TelecomNumber/PostalAddress/ > etc, etc) do this as part of a shared PK pattern; also in general if > the field pointed to the Enumeration entity it should always have the > suffic "EnumId" for clarity, but that doesn't matter since the Type > entity is a better way to go > > 2. to be an extension of the PaymentGatewayConfig entity, the > PayflowPro entity should have the same pk as it (just like Person and > PartyGroup have the partyId for their only pk field), ie it should > just have the paymentGatewayConfigId field as the primary key instead > of the payflowProId; the reason for this is we want a one-to-one > relationship between the two entities... we don't want multiple > PayflowPro records for a single PaymentGatewayConfig record > > Anyway, looks good and it's great to have someone working on this! > > -David > > > On Mar 31, 2009, at 11:17 AM, Marco Risaliti wrote: > > > Anyway I made I mistake in the above example because Payflow Pro is > > a credit card payment gateway and so it's not necessary a new > > payment method type (EXT_PAYFLOW). > > So the corrected example is the following: > > > > <entity-engine-xml> > > <EnumerationType enumTypeId="PGW_CODE" hasTable="N" > > description="Payment Gateway"/> > > > > <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" > > enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> > > > > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" > > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> > > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" > > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > > production"/> > > > > <PayflowPro payflowProId="PAYFLOW_TEST" > > paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ > > {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > > hostAddress="test-payflow.verisign.com" hostPort="443" > > vendor="TestVendor" userId="TestUserID" pwd="TestPassword" > > partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > > enableTransmit="Y"/> > > <PayflowPro payflowProId="PAYFLOW_PROD" > > paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ > > {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > > hostAddress="payflow.verisign.com" hostPort="443" > > vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" > > partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > > enableTransmit="Y"/> > > > > <ProductStorePaymentSetting productStoreId="9000" > > paymentMethodTypeId="CREDIT_CARD" > > paymentServiceTypeEnumId="PRDS_PAY_AUTH" > > paymentService="payflowCCProcessor" > > paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" > > applyToAllProducts=""/> > > </entity-engine-xml> > > > > Thanks > > Marco > > > > > > Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha scritto: > > > >> Hi David, > >> > >> thanks a lot for your great analysis help on this, I have now > >> understood what you mean after trying those new entities. > >> Also I prefer now to implement those specific entities instead of > >> generic ones. > >> > >> If I understood correctly it could be something similar to the > >> following examples: > >> > >> <entity entity-name="PaymentGatewayConfig" > >> package-name="org.ofbiz.accounting.payment" > >> title="Payment Gateway Configuration"> > >> <field name="paymentGatewayConfigId" type="id-ne"></field> > >> <field name="paymentGatewayTypeId" type="id-ne"></field> > >> <field name="description" type="very-long"></field> > >> <prim-key field="paymentGatewayConfigId"/> > >> <relation type="one" fk-name="PGC_ENUM" rel-entity- > >> name="Enumeration"> > >> <key-map field-name="paymentGatewayTypeId" rel-field- > >> name="enumId"/> > >> </relation> > >> </entity> > >> <entity entity-name="PayflowPro" > >> package-name="org.ofbiz.accounting.payment" > >> title="Payflow Pro Payment Gateway Configuration"> > >> <field name="payflowProId" type="id-ne"></field> > >> <field name="paymentGatewayConfigId" type="id-ne"></field> > >> <field name="certsPath" type="value"><description>Path the the > >> VeriSign Certificate</description></field> > >> <field name="hostAddress" type="value"><description>Address of > >> the payment processor</description></field> > >> <field name="hostPort" type="numeric"><description>Port of the > >> payment processor</description></field> > >> <field name="vendor" type="short-varchar"><description>Vendor of > >> account information</description></field> > >> <field name="userId" type="short-varchar"><description>PayFlow > >> UserID of account information</description></field> > >> <field name="pwd" type="short-varchar"><description>PayFlow > >> Password of account information</description></field> > >> <field name="partner" type="short-varchar"><description>PayFlow > >> Partner of account information</description></field> > >> <field name="checkAvs" type="indicator"><description>Use Address > >> Verification</description></field> > >> <field name="checkCvv2" type="indicator"><description>Require > >> CVV2 Verification</description></field> > >> <field name="preAuth" type="indicator"><description>Pre-Authorize > >> Payments (if set to N will auto-capture)</description></field> > >> <field name="enableTransmit" type="indicator"><description>Set to > >> N to not transmit anything</description></field> > >> <prim-key field="payflowProId"/> > >> <relation type="one" fk-name="PFP_PGC" rel-entity- > >> name="PaymentGatewayConfig"> > >> <key-map field-name="paymentGatewayConfigId"/> > >> </relation> > >> </entity> > >> <entity entity-name="ProductStorePaymentSetting" > >> package-name="org.ofbiz.product.store" > >> title="Product Store Payment Settings Entity"> > >> <field name="productStoreId" type="id-ne"></field> > >> <field name="paymentMethodTypeId" type="id-ne"></field> > >> <field name="paymentServiceTypeEnumId" type="id-ne"></field> > >> <field name="paymentService" type="value"></field> > >> <field name="paymentGatewayConfigId" type="id-ne"></field> > >> <field name="paymentPropertiesPath" type="value"></field> > >> <field name="applyToAllProducts" type="indicator"></field> > >> <prim-key field="productStoreId"/> > >> <prim-key field="paymentMethodTypeId"/> > >> <prim-key field="paymentServiceTypeEnumId"/> > >> <relation type="one" fk-name="PRDS_PS_PRDS" rel-entity- > >> name="ProductStore"> > >> <key-map field-name="productStoreId"/> > >> </relation> > >> <relation type="one" fk-name="PRDS_PS_PMNTTP" rel-entity- > >> name="PaymentMethodType"> > >> <key-map field-name="paymentMethodTypeId"/> > >> </relation> > >> <relation type="one" fk-name="PRDS_PS_ENUM" rel-entity- > >> name="Enumeration"> > >> <key-map field-name="paymentServiceTypeEnumId" rel-field- > >> name="enumId"/> > >> </relation> > >> <relation type="one" fk-name="PRDS_PS_PGC" rel-entity- > >> name="PaymentGatewayConfig"> > >> <key-map field-name="paymentGatewayConfigId"/> > >> </relation> > >> </entity> > >> > >> This is an example of Payflow Pro Payment Gateway configuration: > >> > >> <entity-engine-xml> > >> <PaymentMethodType description="Payflow Pro" > >> paymentMethodTypeId="EXT_PAYFLOW"/> > >> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" > >> description="Payment Gateway"/> > >> > >> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" > >> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> > >> > >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" > >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > >> test"/> > >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" > >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > >> production"/> > >> > >> <PayflowPro payflowProId="PAYFLOW_TEST" > >> paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ > >> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > >> hostAddress="test-payflow.verisign.com" hostPort="443" > >> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" > >> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > >> enableTransmit="Y"/> > >> <PayflowPro payflowProId="PAYFLOW_PROD" > >> paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ > >> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > >> hostAddress="payflow.verisign.com" hostPort="443" > >> vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" > >> partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > >> enableTransmit="Y"/> > >> > >> <ProductStorePaymentSetting productStoreId="9000" > >> paymentMethodTypeId="EXT_PAYFLOW" > >> paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" > >> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" > >> applyToAllProducts=""/> > >> </entity-engine-xml> > >> > >> In this way we could handle also different configuration per > >> database (test/production/...) and product stores. > >> > >> Idea and suggestions are welcome. > >> > >> Thanks a lot > >> Marco > >> > >> > >> > >> > >> > >> > >> > >> > >> > >>> > >>> This has been discussed a few times and I think is on a few of the > >>> lists around were people have brainstormed on things they'd like to > >>> add/change/etc. I'm personally very in favor of it and I do > >>> believe it > >>> has been needed for a long time. > >>> > >>> As for the design, I'm very against the concept of super-generic > >>> entities like this. They cause all sorts of problems, and I wish now > >>> that I had never even introduced the extensibility stuff (attribute > >>> tables and such) as they tend to make things messy and difficult to > >>> follow and maintain... if/when they are used. > >>> > >>> It won't be too difficult to add fields and entities for each > >>> property > >>> in the files. With actual entities and fields generic maintenance > >>> can > >>> be done through the Entity Data Maintenance pages, and for more user > >>> friendly stuff we'd want a less generic UI anyway, and it's a lot > >>> easier to implement that specific entities instead of generic ones. > >>> > >>> For example, we would create a PaymentGatewayConfig entity and > >>> entities that extend it where needed for Cybersource, PayflowPro, > >>> PayPal, etc, etc. The main change is that on the > >>> ProductStorePaymentSetting entity instead of using the > >>> "paymentPropertiesPath" field we would add a paymentGatewayConfigId > >>> that points to the corresponding PaymentGatewayConfig entity. That > >>> entity would have a type field, with different values for different > >>> payment gateways (ie CyberSource, PayflowPro, etc). > >>> > >>> Each property in the payment.properties file would be mapped to a > >>> field on one of these entities. > >>> > >>> Does that make sense? > >>> > >>> -David > >>> > >>> > >>> > >>> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: > >>> > >>>> Hi to all, > >>>> > >>>> what did you think if we move the payment.properties to an entity ? > >>>> I tried to having a more general entity but I have seen that every > >>>> single payment gateway having different parameters and so I tried > >>>> with the following example: > >>>> > >>>> <EnumerationType description="Payment Gateway Code" > >>>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> > >>>> <Enumeration description="Gift Certificate" > >>>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" > >>>> sequenceId="01" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" > >>>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" > >>>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="ValueLink" enumCode="VALUELINK" > >>>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" > >>>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="WorldPay" enumCode="WORLDPAY" > >>>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="PayPal" enumCode="PAYPAL" > >>>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="PCCharge" enumCode="PCCHARGE" > >>>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" > >>>> sequenceId="09" enumTypeId="PGW_CODE"/> > >>>> <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" > >>>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" > >>>> enumTypeId="PGW_CODE"/> > >>>> > >>>> <!-- Product store gateway setting --> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" > >>>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ > >>>> accounting/pfcerts" activeAttribute="Y" comment="Path the the > >>>> VeriSign Certificate"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" > >>>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" > >>>> comment="Address of the payment processor"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" > >>>> attributeValue="443" activeAttribute="Y" comment="Port of the > >>>> payment processor"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" > >>>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow > >>>> account information (Vendor)"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" > >>>> attributeValue="[PayFlow UserID]" activeAttribute="Y" > >>>> comment="Payflow account information (PayFlow UserID)"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" > >>>> attributeValue="[PayFlow Password]" activeAttribute="Y" > >>>> comment="Payflow account information (PayFlow Password)"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" > >>>> attributeValue="[PayFlow Partner]" activeAttribute="Y" > >>>> comment="Payflow account information (PayFlow Partner)"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" > >>>> attributeValue="Y" activeAttribute="Y" comment="Use Address > >>>> Verification"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" > >>>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 > >>>> Verification"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" > >>>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize > >>>> Payments (if set to N will auto-capture)"/> > >>>> <ProductStoreGatewaySetting productStoreId="9000" > >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" > >>>> attributeValue="true" activeAttribute="Y" comment="Set to false to > >>>> not transmit anything "/> > >>>> > >>>> > >>>> Once we have it into the DB it could be extended in a custom > >>>> components (hot-deploy) and it could be cashed and it could be no > >>>> more necessary to restart OFBiz once you have to change a value > >>>> into > >>>> this property file. > >>>> I have also moved those parameters at product store level so you > >>>> could have different configuration by product store. > >>>> > >>>> It's only an idea and it could be introduced also after that new > >>>> OFBiz release has been created. > >>>> > >>>> Any ideas and suggestions are welcomed because if it's working > >>>> correctly for everyone it could be extended also to others property > >>>> files (shipment.properties, catalog.properties, ...). > >>>> > >>>> Thanks in advance > >>>> Marco > >>>> > >>> > >>> > >> > > > > |
In reply to this post by BJ Freeman
Just starting down the path of PCI, so when I know more I will let the list know. I was more thinking of getting compliance by moving the storage of credit cards out of the database and into the payment processors servers (secure storage based on tokens)
On 01/04/2009 03:35, "BJ Freeman" <[hidden email]> wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I am wondering how a PCI audit might view having certificates and login info in a database. I know that securing the database is one option. there has been a effort to beef up security through ofbiz. Just something to consider. I have no info one way or the other. Marco Risaliti sent the following on 3/31/2009 10:17 AM: > Anyway I made I mistake in the above example because Payflow Pro is a > credit card payment gateway and so it's not necessary a new payment > method type (EXT_PAYFLOW). > So the corrected example is the following: > > <entity-engine-xml> > <EnumerationType enumTypeId="PGW_CODE" hasTable="N" > description="Payment Gateway"/> > > <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" > enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> > > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> > <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" > paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for > production"/> > > <PayflowPro payflowProId="PAYFLOW_TEST" > paymentGatewayConfigId="PAYFLOW_TEST" > certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="test-payflow.verisign.com" hostPort="443" > vendor="TestVendor" userId="TestUserID" pwd="TestPassword" > partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" > enableTransmit="Y"/> > <PayflowPro payflowProId="PAYFLOW_PROD" > paymentGatewayConfigId="PAYFLOW_PROD" > certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" > hostAddress="payflow.verisign.com" hostPort="443" vendor="ProdVendor" > userId="ProdUserID" pwd="ProdPassword" partner="ProdPartner" > checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> > > <ProductStorePaymentSetting productStoreId="9000" > paymentMethodTypeId="CREDIT_CARD" > paymentServiceTypeEnumId="PRDS_PAY_AUTH" > paymentService="payflowCCProcessor" > paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" > applyToAllProducts=""/> > </entity-engine-xml> > > Thanks > Marco > > > Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha scritto: > >> Hi David, >> >> thanks a lot for your great analysis help on this, I have now >> understood what you mean after trying those new entities. >> Also I prefer now to implement those specific entities instead of >> generic ones. >> >> If I understood correctly it could be something similar to the >> following examples: >> >> <entity entity-name="PaymentGatewayConfig" >> package-name="org.ofbiz.accounting.payment" >> title="Payment Gateway Configuration"> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="paymentGatewayTypeId" type="id-ne"></field> >> <field name="description" type="very-long"></field> >> <prim-key field="paymentGatewayConfigId"/> >> <relation type="one" fk-name="PGC_ENUM" rel-entity-name="Enumeration"> >> <key-map field-name="paymentGatewayTypeId" rel-field-name="enumId"/> >> </relation> >> </entity> >> <entity entity-name="PayflowPro" >> package-name="org.ofbiz.accounting.payment" >> title="Payflow Pro Payment Gateway Configuration"> >> <field name="payflowProId" type="id-ne"></field> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="certsPath" type="value"><description>Path the the >> VeriSign Certificate</description></field> >> <field name="hostAddress" type="value"><description>Address of the >> payment processor</description></field> >> <field name="hostPort" type="numeric"><description>Port of the >> payment processor</description></field> >> <field name="vendor" type="short-varchar"><description>Vendor of >> account information</description></field> >> <field name="userId" type="short-varchar"><description>PayFlow >> UserID of account information</description></field> >> <field name="pwd" type="short-varchar"><description>PayFlow >> Password of account information</description></field> >> <field name="partner" type="short-varchar"><description>PayFlow >> Partner of account information</description></field> >> <field name="checkAvs" type="indicator"><description>Use Address >> Verification</description></field> >> <field name="checkCvv2" type="indicator"><description>Require CVV2 >> Verification</description></field> >> <field name="preAuth" type="indicator"><description>Pre-Authorize >> Payments (if set to N will auto-capture)</description></field> >> <field name="enableTransmit" type="indicator"><description>Set to N >> to not transmit anything</description></field> >> <prim-key field="payflowProId"/> >> <relation type="one" fk-name="PFP_PGC" >> rel-entity-name="PaymentGatewayConfig"> >> <key-map field-name="paymentGatewayConfigId"/> >> </relation> >> </entity> >> <entity entity-name="ProductStorePaymentSetting" >> package-name="org.ofbiz.product.store" >> title="Product Store Payment Settings Entity"> >> <field name="productStoreId" type="id-ne"></field> >> <field name="paymentMethodTypeId" type="id-ne"></field> >> <field name="paymentServiceTypeEnumId" type="id-ne"></field> >> <field name="paymentService" type="value"></field> >> <field name="paymentGatewayConfigId" type="id-ne"></field> >> <field name="paymentPropertiesPath" type="value"></field> >> <field name="applyToAllProducts" type="indicator"></field> >> <prim-key field="productStoreId"/> >> <prim-key field="paymentMethodTypeId"/> >> <prim-key field="paymentServiceTypeEnumId"/> >> <relation type="one" fk-name="PRDS_PS_PRDS" >> rel-entity-name="ProductStore"> >> <key-map field-name="productStoreId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_PMNTTP" >> rel-entity-name="PaymentMethodType"> >> <key-map field-name="paymentMethodTypeId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_ENUM" >> rel-entity-name="Enumeration"> >> <key-map field-name="paymentServiceTypeEnumId" >> rel-field-name="enumId"/> >> </relation> >> <relation type="one" fk-name="PRDS_PS_PGC" >> rel-entity-name="PaymentGatewayConfig"> >> <key-map field-name="paymentGatewayConfigId"/> >> </relation> >> </entity> >> >> This is an example of Payflow Pro Payment Gateway configuration: >> >> <entity-engine-xml> >> <PaymentMethodType description="Payflow Pro" >> paymentMethodTypeId="EXT_PAYFLOW"/> >> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >> description="Payment Gateway"/> >> >> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >> >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for test"/> >> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >> production"/> >> >> <PayflowPro payflowProId="PAYFLOW_TEST" >> paymentGatewayConfigId="PAYFLOW_TEST" >> certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >> hostAddress="test-payflow.verisign.com" hostPort="443" >> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >> enableTransmit="Y"/> >> <PayflowPro payflowProId="PAYFLOW_PROD" >> paymentGatewayConfigId="PAYFLOW_PROD" >> certsPath="${sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >> hostAddress="payflow.verisign.com" hostPort="443" vendor="ProdVendor" >> userId="ProdUserID" pwd="ProdPassword" partner="ProdPartner" >> checkAvs="Y" checkCvv2="Y" preAuth="Y" enableTransmit="Y"/> >> >> <ProductStorePaymentSetting productStoreId="9000" >> paymentMethodTypeId="EXT_PAYFLOW" >> paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" >> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >> applyToAllProducts=""/> >> </entity-engine-xml> >> >> In this way we could handle also different configuration per database >> (test/production/...) and product stores. >> >> Idea and suggestions are welcome. >> >> Thanks a lot >> Marco >> >> >> >> >> >> >> >> >> >>> >>> This has been discussed a few times and I think is on a few of the >>> lists around were people have brainstormed on things they'd like to >>> add/change/etc. I'm personally very in favor of it and I do believe it >>> has been needed for a long time. >>> >>> As for the design, I'm very against the concept of super-generic >>> entities like this. They cause all sorts of problems, and I wish now >>> that I had never even introduced the extensibility stuff (attribute >>> tables and such) as they tend to make things messy and difficult to >>> follow and maintain... if/when they are used. >>> >>> It won't be too difficult to add fields and entities for each property >>> in the files. With actual entities and fields generic maintenance can >>> be done through the Entity Data Maintenance pages, and for more user >>> friendly stuff we'd want a less generic UI anyway, and it's a lot >>> easier to implement that specific entities instead of generic ones. >>> >>> For example, we would create a PaymentGatewayConfig entity and >>> entities that extend it where needed for Cybersource, PayflowPro, >>> PayPal, etc, etc. The main change is that on the >>> ProductStorePaymentSetting entity instead of using the >>> "paymentPropertiesPath" field we would add a paymentGatewayConfigId >>> that points to the corresponding PaymentGatewayConfig entity. That >>> entity would have a type field, with different values for different >>> payment gateways (ie CyberSource, PayflowPro, etc). >>> >>> Each property in the payment.properties file would be mapped to a >>> field on one of these entities. >>> >>> Does that make sense? >>> >>> -David >>> >>> >>> >>> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: >>> >>>> Hi to all, >>>> >>>> what did you think if we move the payment.properties to an entity ? >>>> I tried to having a more general entity but I have seen that every >>>> single payment gateway having different parameters and so I tried >>>> with the following example: >>>> >>>> <EnumerationType description="Payment Gateway Code" >>>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> >>>> <Enumeration description="Gift Certificate" >>>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" >>>> sequenceId="01" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" >>>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" >>>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="ValueLink" enumCode="VALUELINK" >>>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" >>>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="WorldPay" enumCode="WORLDPAY" >>>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PayPal" enumCode="PAYPAL" >>>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="PCCharge" enumCode="PCCHARGE" >>>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" >>>> sequenceId="09" enumTypeId="PGW_CODE"/> >>>> <Enumeration description="Authorize.Net" enumCode="AUTHORIZEDOTNET" >>>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" enumTypeId="PGW_CODE"/> >>>> >>>> <!-- Product store gateway setting --> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" >>>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ >>>> accounting/pfcerts" activeAttribute="Y" comment="Path the the >>>> VeriSign Certificate"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" >>>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" >>>> comment="Address of the payment processor"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" >>>> attributeValue="443" activeAttribute="Y" comment="Port of the >>>> payment processor"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" >>>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow >>>> account information (Vendor)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" >>>> attributeValue="[PayFlow UserID]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow UserID)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" >>>> attributeValue="[PayFlow Password]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow Password)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" >>>> attributeValue="[PayFlow Partner]" activeAttribute="Y" >>>> comment="Payflow account information (PayFlow Partner)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" >>>> attributeValue="Y" activeAttribute="Y" comment="Use Address >>>> Verification"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" >>>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 >>>> Verification"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" >>>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize >>>> Payments (if set to N will auto-capture)"/> >>>> <ProductStoreGatewaySetting productStoreId="9000" >>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" >>>> attributeValue="true" activeAttribute="Y" comment="Set to false to >>>> not transmit anything "/> >>>> >>>> >>>> Once we have it into the DB it could be extended in a custom >>>> components (hot-deploy) and it could be cashed and it could be no >>>> more necessary to restart OFBiz once you have to change a value into >>>> this property file. >>>> I have also moved those parameters at product store level so you >>>> could have different configuration by product store. >>>> >>>> It's only an idea and it could be introduced also after that new >>>> OFBiz release has been created. >>>> >>>> Any ideas and suggestions are welcomed because if it's working >>>> correctly for everyone it could be extended also to others property >>>> files (shipment.properties, catalog.properties, ...). >>>> >>>> Thanks in advance >>>> Marco >>>> >>> >>> >> > > > Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ0nCCrP3NbaWWqE4RAoszAJ9lvTNyKRAi2pSI38S9Av9fK9WYswCePSQZ UkRVxt/EnPkvg/+pJJQA1Z8= =U4ce -----END PGP SIGNATURE----- |
Sam Hamilton wrote:
> Just starting down the path of PCI, so when I know more I will > let the list know. I was more thinking of getting compliance > by moving the storage of credit cards out of the database and > into the payment processors servers (secure storage based on > tokens) How would repeat billing work with that? Would each payment processing server have it's very own logic for handling repeats? Or would the payment submitter just reissue the request? If the latter, then it's barely more secure then actually having the credit card itself; you can still get the money. |
As far as I understand it, and my knowledge at this point is very limited as I am just starting to dig into it, you swap the credit card number with a token and then the credit card details are stored on a remote server that is already PCI compliant. This then allows you to reduce the level of PCI compliance (as far as I know there is 1, 2 & 3 which 3 being the hardest to achieve but required if you store credit card info onsite) as you store this token you can repeat bill but I suppose its debatable if this is really any more secure, but at least the worse that can happen is they only make fraudulent transactions on your site and not use the card info anywhere else. PCI was created by card companies after all.
On 01/04/2009 23:11, "Adam Heath" <[hidden email]> wrote: Sam Hamilton wrote: > Just starting down the path of PCI, so when I know more I will > let the list know. I was more thinking of getting compliance > by moving the storage of credit cards out of the database and > into the payment processors servers (secure storage based on > tokens) How would repeat billing work with that? Would each payment processing server have it's very own logic for handling repeats? Or would the payment submitter just reissue the request? If the latter, then it's barely more secure then actually having the credit card itself; you can still get the money. |
In reply to this post by mrisaliti@libero.it
Adding a prefix would make finding these entities easier. We didn't do that with others like Party/Person and ContactMech/PostalAddress, but yes we certainly could. -David On Apr 1, 2009, at 3:38 AM, [hidden email] wrote: > Ok, thanks a lot for those important clarification. > I will create a new JIRA issue and a patch for it as soon as I can. > Antoher small question : > > did you think that it's better to have a PayflowPro entity or put a > prefix before it (ex. PaymentGatewayPayflowPro, > PaymentGatewayCyberSource, ...) ? > So all the paymentGateway are grouped all together or we can simply > use a specific package name for it > (org.ofbiz.accounting.payment.gateway or ...) and leave the gateway > name as entity name. > > Thanks > Marco > > >> >> Yes, this looks much better Marco, and is just the direction I was >> trying to communicate. >> >> There are a few things you could do to clarify the structure, and >> make >> it more consistent with other sets of entities that are using the >> type/ >> etc pattern: >> >> 1. make a PaymentGatewayConfigType entity instead of using >> Enumeration; the extra table isn't too big a deal, and other entities >> (like Party/Person/PartyGroup, ContactMech/TelecomNumber/ >> PostalAddress/ >> etc, etc) do this as part of a shared PK pattern; also in general if >> the field pointed to the Enumeration entity it should always have the >> suffic "EnumId" for clarity, but that doesn't matter since the Type >> entity is a better way to go >> >> 2. to be an extension of the PaymentGatewayConfig entity, the >> PayflowPro entity should have the same pk as it (just like Person and >> PartyGroup have the partyId for their only pk field), ie it should >> just have the paymentGatewayConfigId field as the primary key instead >> of the payflowProId; the reason for this is we want a one-to-one >> relationship between the two entities... we don't want multiple >> PayflowPro records for a single PaymentGatewayConfig record >> >> Anyway, looks good and it's great to have someone working on this! >> >> -David >> >> >> On Mar 31, 2009, at 11:17 AM, Marco Risaliti wrote: >> >>> Anyway I made I mistake in the above example because Payflow Pro is >>> a credit card payment gateway and so it's not necessary a new >>> payment method type (EXT_PAYFLOW). >>> So the corrected example is the following: >>> >>> <entity-engine-xml> >>> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >>> description="Payment Gateway"/> >>> >>> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >>> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >>> >>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>> test"/> >>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>> production"/> >>> >>> <PayflowPro payflowProId="PAYFLOW_TEST" >>> paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ >>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>> hostAddress="test-payflow.verisign.com" hostPort="443" >>> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >>> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>> enableTransmit="Y"/> >>> <PayflowPro payflowProId="PAYFLOW_PROD" >>> paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ >>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>> hostAddress="payflow.verisign.com" hostPort="443" >>> vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" >>> partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>> enableTransmit="Y"/> >>> >>> <ProductStorePaymentSetting productStoreId="9000" >>> paymentMethodTypeId="CREDIT_CARD" >>> paymentServiceTypeEnumId="PRDS_PAY_AUTH" >>> paymentService="payflowCCProcessor" >>> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >>> applyToAllProducts=""/> >>> </entity-engine-xml> >>> >>> Thanks >>> Marco >>> >>> >>> Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha scritto: >>> >>>> Hi David, >>>> >>>> thanks a lot for your great analysis help on this, I have now >>>> understood what you mean after trying those new entities. >>>> Also I prefer now to implement those specific entities instead of >>>> generic ones. >>>> >>>> If I understood correctly it could be something similar to the >>>> following examples: >>>> >>>> <entity entity-name="PaymentGatewayConfig" >>>> package-name="org.ofbiz.accounting.payment" >>>> title="Payment Gateway Configuration"> >>>> <field name="paymentGatewayConfigId" type="id-ne"></field> >>>> <field name="paymentGatewayTypeId" type="id-ne"></field> >>>> <field name="description" type="very-long"></field> >>>> <prim-key field="paymentGatewayConfigId"/> >>>> <relation type="one" fk-name="PGC_ENUM" rel-entity- >>>> name="Enumeration"> >>>> <key-map field-name="paymentGatewayTypeId" rel-field- >>>> name="enumId"/> >>>> </relation> >>>> </entity> >>>> <entity entity-name="PayflowPro" >>>> package-name="org.ofbiz.accounting.payment" >>>> title="Payflow Pro Payment Gateway Configuration"> >>>> <field name="payflowProId" type="id-ne"></field> >>>> <field name="paymentGatewayConfigId" type="id-ne"></field> >>>> <field name="certsPath" type="value"><description>Path the the >>>> VeriSign Certificate</description></field> >>>> <field name="hostAddress" type="value"><description>Address of >>>> the payment processor</description></field> >>>> <field name="hostPort" type="numeric"><description>Port of the >>>> payment processor</description></field> >>>> <field name="vendor" type="short-varchar"><description>Vendor of >>>> account information</description></field> >>>> <field name="userId" type="short-varchar"><description>PayFlow >>>> UserID of account information</description></field> >>>> <field name="pwd" type="short-varchar"><description>PayFlow >>>> Password of account information</description></field> >>>> <field name="partner" type="short-varchar"><description>PayFlow >>>> Partner of account information</description></field> >>>> <field name="checkAvs" type="indicator"><description>Use Address >>>> Verification</description></field> >>>> <field name="checkCvv2" type="indicator"><description>Require >>>> CVV2 Verification</description></field> >>>> <field name="preAuth" type="indicator"><description>Pre-Authorize >>>> Payments (if set to N will auto-capture)</description></field> >>>> <field name="enableTransmit" type="indicator"><description>Set to >>>> N to not transmit anything</description></field> >>>> <prim-key field="payflowProId"/> >>>> <relation type="one" fk-name="PFP_PGC" rel-entity- >>>> name="PaymentGatewayConfig"> >>>> <key-map field-name="paymentGatewayConfigId"/> >>>> </relation> >>>> </entity> >>>> <entity entity-name="ProductStorePaymentSetting" >>>> package-name="org.ofbiz.product.store" >>>> title="Product Store Payment Settings Entity"> >>>> <field name="productStoreId" type="id-ne"></field> >>>> <field name="paymentMethodTypeId" type="id-ne"></field> >>>> <field name="paymentServiceTypeEnumId" type="id-ne"></field> >>>> <field name="paymentService" type="value"></field> >>>> <field name="paymentGatewayConfigId" type="id-ne"></field> >>>> <field name="paymentPropertiesPath" type="value"></field> >>>> <field name="applyToAllProducts" type="indicator"></field> >>>> <prim-key field="productStoreId"/> >>>> <prim-key field="paymentMethodTypeId"/> >>>> <prim-key field="paymentServiceTypeEnumId"/> >>>> <relation type="one" fk-name="PRDS_PS_PRDS" rel-entity- >>>> name="ProductStore"> >>>> <key-map field-name="productStoreId"/> >>>> </relation> >>>> <relation type="one" fk-name="PRDS_PS_PMNTTP" rel-entity- >>>> name="PaymentMethodType"> >>>> <key-map field-name="paymentMethodTypeId"/> >>>> </relation> >>>> <relation type="one" fk-name="PRDS_PS_ENUM" rel-entity- >>>> name="Enumeration"> >>>> <key-map field-name="paymentServiceTypeEnumId" rel-field- >>>> name="enumId"/> >>>> </relation> >>>> <relation type="one" fk-name="PRDS_PS_PGC" rel-entity- >>>> name="PaymentGatewayConfig"> >>>> <key-map field-name="paymentGatewayConfigId"/> >>>> </relation> >>>> </entity> >>>> >>>> This is an example of Payflow Pro Payment Gateway configuration: >>>> >>>> <entity-engine-xml> >>>> <PaymentMethodType description="Payflow Pro" >>>> paymentMethodTypeId="EXT_PAYFLOW"/> >>>> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >>>> description="Payment Gateway"/> >>>> >>>> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >>>> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >>>> >>>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >>>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>>> test"/> >>>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >>>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>>> production"/> >>>> >>>> <PayflowPro payflowProId="PAYFLOW_TEST" >>>> paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ >>>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>>> hostAddress="test-payflow.verisign.com" hostPort="443" >>>> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >>>> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>>> enableTransmit="Y"/> >>>> <PayflowPro payflowProId="PAYFLOW_PROD" >>>> paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ >>>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>>> hostAddress="payflow.verisign.com" hostPort="443" >>>> vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" >>>> partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>>> enableTransmit="Y"/> >>>> >>>> <ProductStorePaymentSetting productStoreId="9000" >>>> paymentMethodTypeId="EXT_PAYFLOW" >>>> paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" >>>> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >>>> applyToAllProducts=""/> >>>> </entity-engine-xml> >>>> >>>> In this way we could handle also different configuration per >>>> database (test/production/...) and product stores. >>>> >>>> Idea and suggestions are welcome. >>>> >>>> Thanks a lot >>>> Marco >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>>> >>>>> This has been discussed a few times and I think is on a few of the >>>>> lists around were people have brainstormed on things they'd like >>>>> to >>>>> add/change/etc. I'm personally very in favor of it and I do >>>>> believe it >>>>> has been needed for a long time. >>>>> >>>>> As for the design, I'm very against the concept of super-generic >>>>> entities like this. They cause all sorts of problems, and I wish >>>>> now >>>>> that I had never even introduced the extensibility stuff >>>>> (attribute >>>>> tables and such) as they tend to make things messy and difficult >>>>> to >>>>> follow and maintain... if/when they are used. >>>>> >>>>> It won't be too difficult to add fields and entities for each >>>>> property >>>>> in the files. With actual entities and fields generic maintenance >>>>> can >>>>> be done through the Entity Data Maintenance pages, and for more >>>>> user >>>>> friendly stuff we'd want a less generic UI anyway, and it's a lot >>>>> easier to implement that specific entities instead of generic >>>>> ones. >>>>> >>>>> For example, we would create a PaymentGatewayConfig entity and >>>>> entities that extend it where needed for Cybersource, PayflowPro, >>>>> PayPal, etc, etc. The main change is that on the >>>>> ProductStorePaymentSetting entity instead of using the >>>>> "paymentPropertiesPath" field we would add a >>>>> paymentGatewayConfigId >>>>> that points to the corresponding PaymentGatewayConfig entity. That >>>>> entity would have a type field, with different values for >>>>> different >>>>> payment gateways (ie CyberSource, PayflowPro, etc). >>>>> >>>>> Each property in the payment.properties file would be mapped to a >>>>> field on one of these entities. >>>>> >>>>> Does that make sense? >>>>> >>>>> -David >>>>> >>>>> >>>>> >>>>> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: >>>>> >>>>>> Hi to all, >>>>>> >>>>>> what did you think if we move the payment.properties to an >>>>>> entity ? >>>>>> I tried to having a more general entity but I have seen that >>>>>> every >>>>>> single payment gateway having different parameters and so I tried >>>>>> with the following example: >>>>>> >>>>>> <EnumerationType description="Payment Gateway Code" >>>>>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> >>>>>> <Enumeration description="Gift Certificate" >>>>>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" >>>>>> sequenceId="01" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" >>>>>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="ClearCommerce" enumCode="CLEARCOMMERCE" >>>>>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" >>>>>> enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="ValueLink" enumCode="VALUELINK" >>>>>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" >>>>>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="WorldPay" enumCode="WORLDPAY" >>>>>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="PayPal" enumCode="PAYPAL" >>>>>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="PCCharge" enumCode="PCCHARGE" >>>>>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="RiTA" enumCode="RITA" enumId="PGW_RITA" >>>>>> sequenceId="09" enumTypeId="PGW_CODE"/> >>>>>> <Enumeration description="Authorize.Net" >>>>>> enumCode="AUTHORIZEDOTNET" >>>>>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" >>>>>> enumTypeId="PGW_CODE"/> >>>>>> >>>>>> <!-- Product store gateway setting --> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" >>>>>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ >>>>>> accounting/pfcerts" activeAttribute="Y" comment="Path the the >>>>>> VeriSign Certificate"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" >>>>>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" >>>>>> comment="Address of the payment processor"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" >>>>>> attributeValue="443" activeAttribute="Y" comment="Port of the >>>>>> payment processor"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" >>>>>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow >>>>>> account information (Vendor)"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" >>>>>> attributeValue="[PayFlow UserID]" activeAttribute="Y" >>>>>> comment="Payflow account information (PayFlow UserID)"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" >>>>>> attributeValue="[PayFlow Password]" activeAttribute="Y" >>>>>> comment="Payflow account information (PayFlow Password)"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" >>>>>> attributeValue="[PayFlow Partner]" activeAttribute="Y" >>>>>> comment="Payflow account information (PayFlow Partner)"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" >>>>>> attributeValue="Y" activeAttribute="Y" comment="Use Address >>>>>> Verification"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" >>>>>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 >>>>>> Verification"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" >>>>>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize >>>>>> Payments (if set to N will auto-capture)"/> >>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" >>>>>> attributeValue="true" activeAttribute="Y" comment="Set to false >>>>>> to >>>>>> not transmit anything "/> >>>>>> >>>>>> >>>>>> Once we have it into the DB it could be extended in a custom >>>>>> components (hot-deploy) and it could be cashed and it could be no >>>>>> more necessary to restart OFBiz once you have to change a value >>>>>> into >>>>>> this property file. >>>>>> I have also moved those parameters at product store level so you >>>>>> could have different configuration by product store. >>>>>> >>>>>> It's only an idea and it could be introduced also after that new >>>>>> OFBiz release has been created. >>>>>> >>>>>> Any ideas and suggestions are welcomed because if it's working >>>>>> correctly for everyone it could be extended also to others >>>>>> property >>>>>> files (shipment.properties, catalog.properties, ...). >>>>>> >>>>>> Thanks in advance >>>>>> Marco >>>>>> >>>>> >>>>> >>>> >>> >> >> > |
Also I prefer to rename that entities to PaymentGatewayPayflowPro,
PaymentGatewayCyberSource. If anyone disagree with that I proceed in that way and when it will be ready open a new JIRA issue. Thanks Marco Il giorno 01/apr/09, alle ore 21:41, David E Jones ha scritto: > > Adding a prefix would make finding these entities easier. We didn't > do that with others like Party/Person and ContactMech/PostalAddress, > but yes we certainly could. > > -David > > > On Apr 1, 2009, at 3:38 AM, [hidden email] wrote: > >> Ok, thanks a lot for those important clarification. >> I will create a new JIRA issue and a patch for it as soon as I can. >> Antoher small question : >> >> did you think that it's better to have a PayflowPro entity or put a >> prefix before it (ex. PaymentGatewayPayflowPro, >> PaymentGatewayCyberSource, ...) ? >> So all the paymentGateway are grouped all together or we can simply >> use a specific package name for it >> (org.ofbiz.accounting.payment.gateway or ...) and leave the gateway >> name as entity name. >> >> Thanks >> Marco >> >> >>> >>> Yes, this looks much better Marco, and is just the direction I was >>> trying to communicate. >>> >>> There are a few things you could do to clarify the structure, and >>> make >>> it more consistent with other sets of entities that are using the >>> type/ >>> etc pattern: >>> >>> 1. make a PaymentGatewayConfigType entity instead of using >>> Enumeration; the extra table isn't too big a deal, and other >>> entities >>> (like Party/Person/PartyGroup, ContactMech/TelecomNumber/ >>> PostalAddress/ >>> etc, etc) do this as part of a shared PK pattern; also in general if >>> the field pointed to the Enumeration entity it should always have >>> the >>> suffic "EnumId" for clarity, but that doesn't matter since the Type >>> entity is a better way to go >>> >>> 2. to be an extension of the PaymentGatewayConfig entity, the >>> PayflowPro entity should have the same pk as it (just like Person >>> and >>> PartyGroup have the partyId for their only pk field), ie it should >>> just have the paymentGatewayConfigId field as the primary key >>> instead >>> of the payflowProId; the reason for this is we want a one-to-one >>> relationship between the two entities... we don't want multiple >>> PayflowPro records for a single PaymentGatewayConfig record >>> >>> Anyway, looks good and it's great to have someone working on this! >>> >>> -David >>> >>> >>> On Mar 31, 2009, at 11:17 AM, Marco Risaliti wrote: >>> >>>> Anyway I made I mistake in the above example because Payflow Pro is >>>> a credit card payment gateway and so it's not necessary a new >>>> payment method type (EXT_PAYFLOW). >>>> So the corrected example is the following: >>>> >>>> <entity-engine-xml> >>>> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >>>> description="Payment Gateway"/> >>>> >>>> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >>>> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >>>> >>>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >>>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>>> test"/> >>>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >>>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>>> production"/> >>>> >>>> <PayflowPro payflowProId="PAYFLOW_TEST" >>>> paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ >>>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>>> hostAddress="test-payflow.verisign.com" hostPort="443" >>>> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >>>> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>>> enableTransmit="Y"/> >>>> <PayflowPro payflowProId="PAYFLOW_PROD" >>>> paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ >>>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>>> hostAddress="payflow.verisign.com" hostPort="443" >>>> vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" >>>> partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>>> enableTransmit="Y"/> >>>> >>>> <ProductStorePaymentSetting productStoreId="9000" >>>> paymentMethodTypeId="CREDIT_CARD" >>>> paymentServiceTypeEnumId="PRDS_PAY_AUTH" >>>> paymentService="payflowCCProcessor" >>>> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >>>> applyToAllProducts=""/> >>>> </entity-engine-xml> >>>> >>>> Thanks >>>> Marco >>>> >>>> >>>> Il giorno 31/mar/09, alle ore 15:12, [hidden email] ha >>>> scritto: >>>> >>>>> Hi David, >>>>> >>>>> thanks a lot for your great analysis help on this, I have now >>>>> understood what you mean after trying those new entities. >>>>> Also I prefer now to implement those specific entities instead of >>>>> generic ones. >>>>> >>>>> If I understood correctly it could be something similar to the >>>>> following examples: >>>>> >>>>> <entity entity-name="PaymentGatewayConfig" >>>>> package-name="org.ofbiz.accounting.payment" >>>>> title="Payment Gateway Configuration"> >>>>> <field name="paymentGatewayConfigId" type="id-ne"></field> >>>>> <field name="paymentGatewayTypeId" type="id-ne"></field> >>>>> <field name="description" type="very-long"></field> >>>>> <prim-key field="paymentGatewayConfigId"/> >>>>> <relation type="one" fk-name="PGC_ENUM" rel-entity- >>>>> name="Enumeration"> >>>>> <key-map field-name="paymentGatewayTypeId" rel-field- >>>>> name="enumId"/> >>>>> </relation> >>>>> </entity> >>>>> <entity entity-name="PayflowPro" >>>>> package-name="org.ofbiz.accounting.payment" >>>>> title="Payflow Pro Payment Gateway Configuration"> >>>>> <field name="payflowProId" type="id-ne"></field> >>>>> <field name="paymentGatewayConfigId" type="id-ne"></field> >>>>> <field name="certsPath" type="value"><description>Path the the >>>>> VeriSign Certificate</description></field> >>>>> <field name="hostAddress" type="value"><description>Address of >>>>> the payment processor</description></field> >>>>> <field name="hostPort" type="numeric"><description>Port of the >>>>> payment processor</description></field> >>>>> <field name="vendor" type="short-varchar"><description>Vendor of >>>>> account information</description></field> >>>>> <field name="userId" type="short-varchar"><description>PayFlow >>>>> UserID of account information</description></field> >>>>> <field name="pwd" type="short-varchar"><description>PayFlow >>>>> Password of account information</description></field> >>>>> <field name="partner" type="short-varchar"><description>PayFlow >>>>> Partner of account information</description></field> >>>>> <field name="checkAvs" type="indicator"><description>Use Address >>>>> Verification</description></field> >>>>> <field name="checkCvv2" type="indicator"><description>Require >>>>> CVV2 Verification</description></field> >>>>> <field name="preAuth" type="indicator"><description>Pre-Authorize >>>>> Payments (if set to N will auto-capture)</description></field> >>>>> <field name="enableTransmit" type="indicator"><description>Set to >>>>> N to not transmit anything</description></field> >>>>> <prim-key field="payflowProId"/> >>>>> <relation type="one" fk-name="PFP_PGC" rel-entity- >>>>> name="PaymentGatewayConfig"> >>>>> <key-map field-name="paymentGatewayConfigId"/> >>>>> </relation> >>>>> </entity> >>>>> <entity entity-name="ProductStorePaymentSetting" >>>>> package-name="org.ofbiz.product.store" >>>>> title="Product Store Payment Settings Entity"> >>>>> <field name="productStoreId" type="id-ne"></field> >>>>> <field name="paymentMethodTypeId" type="id-ne"></field> >>>>> <field name="paymentServiceTypeEnumId" type="id-ne"></field> >>>>> <field name="paymentService" type="value"></field> >>>>> <field name="paymentGatewayConfigId" type="id-ne"></field> >>>>> <field name="paymentPropertiesPath" type="value"></field> >>>>> <field name="applyToAllProducts" type="indicator"></field> >>>>> <prim-key field="productStoreId"/> >>>>> <prim-key field="paymentMethodTypeId"/> >>>>> <prim-key field="paymentServiceTypeEnumId"/> >>>>> <relation type="one" fk-name="PRDS_PS_PRDS" rel-entity- >>>>> name="ProductStore"> >>>>> <key-map field-name="productStoreId"/> >>>>> </relation> >>>>> <relation type="one" fk-name="PRDS_PS_PMNTTP" rel-entity- >>>>> name="PaymentMethodType"> >>>>> <key-map field-name="paymentMethodTypeId"/> >>>>> </relation> >>>>> <relation type="one" fk-name="PRDS_PS_ENUM" rel-entity- >>>>> name="Enumeration"> >>>>> <key-map field-name="paymentServiceTypeEnumId" rel-field- >>>>> name="enumId"/> >>>>> </relation> >>>>> <relation type="one" fk-name="PRDS_PS_PGC" rel-entity- >>>>> name="PaymentGatewayConfig"> >>>>> <key-map field-name="paymentGatewayConfigId"/> >>>>> </relation> >>>>> </entity> >>>>> >>>>> This is an example of Payflow Pro Payment Gateway configuration: >>>>> >>>>> <entity-engine-xml> >>>>> <PaymentMethodType description="Payflow Pro" >>>>> paymentMethodTypeId="EXT_PAYFLOW"/> >>>>> <EnumerationType enumTypeId="PGW_CODE" hasTable="N" >>>>> description="Payment Gateway"/> >>>>> >>>>> <Enumeration enumId="PGW_PAYFLOWPRO" enumTypeId="PGW_CODE" >>>>> enumCode="PAYFLOWPRO" sequenceId="1" description="Payflow Pro"/> >>>>> >>>>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_TEST" >>>>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>>>> test"/> >>>>> <PaymentGatewayConfig paymentGatewayConfigId="PAYFLOW_PROD" >>>>> paymentGatewayTypeId="PGW_PAYFLOWPRO" description="PayFlow for >>>>> production"/> >>>>> >>>>> <PayflowPro payflowProId="PAYFLOW_TEST" >>>>> paymentGatewayConfigId="PAYFLOW_TEST" certsPath="$ >>>>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>>>> hostAddress="test-payflow.verisign.com" hostPort="443" >>>>> vendor="TestVendor" userId="TestUserID" pwd="TestPassword" >>>>> partner="TestPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>>>> enableTransmit="Y"/> >>>>> <PayflowPro payflowProId="PAYFLOW_PROD" >>>>> paymentGatewayConfigId="PAYFLOW_PROD" certsPath="$ >>>>> {sys:getProperty('ofbiz.home')}/applications/accounting/pfcerts" >>>>> hostAddress="payflow.verisign.com" hostPort="443" >>>>> vendor="ProdVendor" userId="ProdUserID" pwd="ProdPassword" >>>>> partner="ProdPartner" checkAvs="Y" checkCvv2="Y" preAuth="Y" >>>>> enableTransmit="Y"/> >>>>> >>>>> <ProductStorePaymentSetting productStoreId="9000" >>>>> paymentMethodTypeId="EXT_PAYFLOW" >>>>> paymentServiceTypeEnumId="PRDS_PAY_EXTERNAL" paymentService="" >>>>> paymentGatewayConfigId="PAYFLOW_TEST" paymentPropertiesPath="" >>>>> applyToAllProducts=""/> >>>>> </entity-engine-xml> >>>>> >>>>> In this way we could handle also different configuration per >>>>> database (test/production/...) and product stores. >>>>> >>>>> Idea and suggestions are welcome. >>>>> >>>>> Thanks a lot >>>>> Marco >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> >>>>>> This has been discussed a few times and I think is on a few of >>>>>> the >>>>>> lists around were people have brainstormed on things they'd >>>>>> like to >>>>>> add/change/etc. I'm personally very in favor of it and I do >>>>>> believe it >>>>>> has been needed for a long time. >>>>>> >>>>>> As for the design, I'm very against the concept of super-generic >>>>>> entities like this. They cause all sorts of problems, and I >>>>>> wish now >>>>>> that I had never even introduced the extensibility stuff >>>>>> (attribute >>>>>> tables and such) as they tend to make things messy and >>>>>> difficult to >>>>>> follow and maintain... if/when they are used. >>>>>> >>>>>> It won't be too difficult to add fields and entities for each >>>>>> property >>>>>> in the files. With actual entities and fields generic maintenance >>>>>> can >>>>>> be done through the Entity Data Maintenance pages, and for more >>>>>> user >>>>>> friendly stuff we'd want a less generic UI anyway, and it's a lot >>>>>> easier to implement that specific entities instead of generic >>>>>> ones. >>>>>> >>>>>> For example, we would create a PaymentGatewayConfig entity and >>>>>> entities that extend it where needed for Cybersource, PayflowPro, >>>>>> PayPal, etc, etc. The main change is that on the >>>>>> ProductStorePaymentSetting entity instead of using the >>>>>> "paymentPropertiesPath" field we would add a >>>>>> paymentGatewayConfigId >>>>>> that points to the corresponding PaymentGatewayConfig entity. >>>>>> That >>>>>> entity would have a type field, with different values for >>>>>> different >>>>>> payment gateways (ie CyberSource, PayflowPro, etc). >>>>>> >>>>>> Each property in the payment.properties file would be mapped to a >>>>>> field on one of these entities. >>>>>> >>>>>> Does that make sense? >>>>>> >>>>>> -David >>>>>> >>>>>> >>>>>> >>>>>> On Mar 30, 2009, at 4:14 AM, [hidden email] wrote: >>>>>> >>>>>>> Hi to all, >>>>>>> >>>>>>> what did you think if we move the payment.properties to an >>>>>>> entity ? >>>>>>> I tried to having a more general entity but I have seen that >>>>>>> every >>>>>>> single payment gateway having different parameters and so I >>>>>>> tried >>>>>>> with the following example: >>>>>>> >>>>>>> <EnumerationType description="Payment Gateway Code" >>>>>>> enumTypeId="PGW_CODE" hasTable="N" parentTypeId=""/> >>>>>>> <Enumeration description="Gift Certificate" >>>>>>> enumCode="GIFTCERTIFICATE" enumId="PGW_GIFTCERTIFICATE" >>>>>>> sequenceId="01" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="CyberSource" enumCode="CYBERSOURCE" >>>>>>> enumId="PGW_CYBERSOURCE" sequenceId="02" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="ClearCommerce" >>>>>>> enumCode="CLEARCOMMERCE" >>>>>>> enumId="PGW_CLEARCOMMERCE" sequenceId="03" >>>>>>> enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="ValueLink" enumCode="VALUELINK" >>>>>>> enumId="PGW_VALUELINK" sequenceId="04" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="PayFlow Pro" enumCode="PAYFLOW" >>>>>>> enumId="PGW_PAYFLOW" sequenceId="05" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="WorldPay" enumCode="WORLDPAY" >>>>>>> enumId="PGW_WORLDPAY" sequenceId="06" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="PayPal" enumCode="PAYPAL" >>>>>>> enumId="PGW_PAYPAL" sequenceId="07" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="PCCharge" enumCode="PCCHARGE" >>>>>>> enumId="PGW_PCCHARGE" sequenceId="08" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="RiTA" enumCode="RITA" >>>>>>> enumId="PGW_RITA" >>>>>>> sequenceId="09" enumTypeId="PGW_CODE"/> >>>>>>> <Enumeration description="Authorize.Net" >>>>>>> enumCode="AUTHORIZEDOTNET" >>>>>>> enumId="PGW_AUTHORIZEDOTNET" sequenceId="10" >>>>>>> enumTypeId="PGW_CODE"/> >>>>>>> >>>>>>> <!-- Product store gateway setting --> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="certsPath" >>>>>>> attributeValue="${sys:getProperty('ofbiz.home')}/applications/ >>>>>>> accounting/pfcerts" activeAttribute="Y" comment="Path the the >>>>>>> VeriSign Certificate"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostAddress" >>>>>>> attributeValue="test-payflow.verisign.com" activeAttribute="Y" >>>>>>> comment="Address of the payment processor"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="hostPort" >>>>>>> attributeValue="443" activeAttribute="Y" comment="Port of the >>>>>>> payment processor"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="vendor" >>>>>>> attributeValue="[Vendor]" activeAttribute="Y" comment="Payflow >>>>>>> account information (Vendor)"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="user" >>>>>>> attributeValue="[PayFlow UserID]" activeAttribute="Y" >>>>>>> comment="Payflow account information (PayFlow UserID)"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="pwd" >>>>>>> attributeValue="[PayFlow Password]" activeAttribute="Y" >>>>>>> comment="Payflow account information (PayFlow Password)"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="partner" >>>>>>> attributeValue="[PayFlow Partner]" activeAttribute="Y" >>>>>>> comment="Payflow account information (PayFlow Partner)"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkAvs" >>>>>>> attributeValue="Y" activeAttribute="Y" comment="Use Address >>>>>>> Verification"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="checkCvv2" >>>>>>> attributeValue="Y" activeAttribute="Y" comment="Require CVV2 >>>>>>> Verification"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="preAuth" >>>>>>> attributeValue="Y" activeAttribute="Y" comment="Pre-Authorize >>>>>>> Payments (if set to N will auto-capture)"/> >>>>>>> <ProductStoreGatewaySetting productStoreId="9000" >>>>>>> gatewayEnumId="PGW_PAYFLOW" attributeKey="enableTransmit" >>>>>>> attributeValue="true" activeAttribute="Y" comment="Set to >>>>>>> false to >>>>>>> not transmit anything "/> >>>>>>> >>>>>>> >>>>>>> Once we have it into the DB it could be extended in a custom >>>>>>> components (hot-deploy) and it could be cashed and it could be >>>>>>> no >>>>>>> more necessary to restart OFBiz once you have to change a value >>>>>>> into >>>>>>> this property file. >>>>>>> I have also moved those parameters at product store level so you >>>>>>> could have different configuration by product store. >>>>>>> >>>>>>> It's only an idea and it could be introduced also after that new >>>>>>> OFBiz release has been created. >>>>>>> >>>>>>> Any ideas and suggestions are welcomed because if it's working >>>>>>> correctly for everyone it could be extended also to others >>>>>>> property >>>>>>> files (shipment.properties, catalog.properties, ...). >>>>>>> >>>>>>> Thanks in advance >>>>>>> Marco >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>> >>> >> > |
Free forum by Nabble | Edit this page |