Sunday 08 April 2007 11:16:54 am
Hello Martin, > It would be great to have a guide to understand the differences between payment gateway, workflows payment event and the way the gateway has to behave.
It's true. It would be nice to have better inline and external code documentation for these components of the kernel. > What inputs & outputs are needed in the payment gateway to be behave as an action in the workflow and then continue executing the workflow if needed or stop if something went wrong.
There are several existing example models for creating what can 'do the job' of a payment gateway built into eZ publish and external workflow / payment gateway contributions. One may even be able to write a deferred to cron payment gateway (workflow event) or a payment gateway url operator, etc, ad-nauseum. The options are only limited to your understanding of the related kernel systems; shop, workflow, trigger, ezutils, module, eZModuleOperationInfo, eZOperationMemento There are a large number of details which are less than clear without experience. > This part of ezpublish is really dark. I spent weeks developing a payment gateway but still don't understand really how it works, the way it insert into the workflow process (status accepted, rejected...etc)
Congratulations on your success. I think you could reach the deliverables in documentation most quickly by taking a strategic move to contribute your payment gateway on, http://projects.ez.no With your gateway available for communal code review, discussion and improvement you can more effectively engage other like minded eZ Publish developers. Together the eZ Community offers a large number of potential collaborators. With all the opportunity available in the eZ Community with a little persistence I'm certain you would reach your goals more quickly and directly than otherwise. > I have checker all the payment gateway contributions but they are each based on totally different principle and behavior so its hard to extract a working process out of them.
It's true that the history behind payment gateway support is unique. In the beginning payment gateways were first implemented as workflow events (before eZ Publish 3.5). After eZ Publish 3.5 payment gateways could also be implemented as a new base php class separate from the workflow system indirectly supported by the workflow system (which controls workflow event / payment gateway triggers). Most payment gateways in the ez.no contributions and PubSVN are not based on the paymentgateway class and the 3.5 features to flexibly support multiple payment gateways. <i>http://pubsvn.ez.no/websvn/listing.php?repname=nextgen&path=%2Ftrunk%2Fkernel%2Fshop%2Fclasses%2F&rev=7012&sc=1</i> This major advancement in eZ Publish payment gateway support features was not documented in the public release changelog, <i>http://ez.no/download/ez_publish/changelogs/ez_publish_3_5</i> It was noted in the actual full changelog, 'Added new interface for building payment gateways.' <i>http://pubsvn.ez.no/nextgen/trunk/doc/changelogs/3.5/CHANGELOG-3.4.4-to-3.5.0</i> To-date eZ Authorize and eZ Paypal are the only available payment gateways (no-redirect/curl vs redirect gateway classes) which use the multiple payment gateway support. Paynet solution is rumored to also be derived of the 3.5 payment gateway support; though it's not yet free software available for public review. > What is the aim of the paymentgateway.ini ? This file is not even used in the ezpaypal gateway that is include in ezp.
Here is the contents of the settings/paymentgateways.ini #?ini charset="iso-8859-1"?
[GatewaysSettings]
AvailableGateways[]
GatewaysDirectories[]
GatewaysDirectories[]=kernel/shop/paymentgateways
You can see that the block 'GatewaySettings' contains the 'AvailableGateways' array which is empty by default. The 'AvailableGateways' array is similar in style as 'AvailableEventTypes' setting array. You can see that the 'GatewaysDirectories' is similar in style as 'ExtensionDirectories' setting which is often used to hold a directory path to use to autoload php code. You can see that the 'GatewaysDirectories' is similar in style as 'ExtensionDirectories' setting which is often used to hold a directory path to use to autoload php code. Martin you can get the most from the eZ Community when you share your information. When we all share together we can accomplish tasks which alone might appear daunting. One could easily write an article on the composition of your contributed payment gateway which might answer some of your more complicated or detailed questions.
Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org
|