Forums / Developer / Register payment gateway

Register payment gateway

Author Message

Karol Radziuk

Thursday 26 August 2010 4:12:13 am

Hi,

I have problem with my own payment gateway. I've used eZpayplal extension to help. After commenting and disabling almost everything that was in eZpaypal I have this code, which is still working (I can select Paypal gateway called 'Paypal'). I wrote almost the same code, but it doesn't work. (I can't select my gateway called 'DotPay').

This is rest of Paypal code:

define( "EZ_PAYMENT_GATEWAY_TYPE_PAYPAL", "ezpaypal" );

class eZPaypalGateway extends eZRedirectGateway
{
    function eZPaypalGateway()
    {
            $this->logger   = eZPaymentLogger::CreateForAdd( "var/log/ambDotPayType.log" );
            $this->logger->writeTimedString( 'eZPaypalGateway::eZPaypalGateway()' );
    }
}

eZPaymentGatewayType::registerGateway( EZ_PAYMENT_GATEWAY_TYPE_PAYPAL, "ezpaypalgateway", "Paypal" );

And this is my code:

define( "EZ_PAYMENT_GATEWAY_TYPE", "ezdotpay" );

class eZDotPayGateway extends eZRedirectGateway
{
    function eZDotPayGateway()
    {
        $this->logger   = eZPaymentLogger::CreateForAdd( "var/log/eZDotPayGateway.log" );
        $this->logger->writeTimedString( 'eZDotPayGateway::eZDotPayGateway()' );
    }
    
    function execute( $process, $event ) {
        
        return eZWorkflowType::STATUS_ACCEPTED;
    }
    
}

eZPaymentGatewayType::registerGateway( EZ_PAYMENT_GATEWAY_TYPE, "ezdotpaygateway", "DotPay" );

I refresh autoload with the same result:

./bin/php/ezpgenerateautoloads.php -e -p

What is overlooked?

{$me|attribute(show,1)}

Karol Radziuk

Thursday 26 August 2010 6:21:55 am

After several hours of struggling I noticed that the name extension must be the same as the name of the class. It follows that each gateway must be a separate extension.

And even if one file is sufficient:

extension/<my_ext_name>/classes/<my_ext_name>gateway.php

and class must then be of the same name.

So, now question is: Why have entries in workflow.ini.append.php no influence on it?

I mean:

[EventSettings]
ExtensionDirectories[]=<my_ext_name>
AvailableEventTypes[]=event_<my_ext_name>

{$me|attribute(show,1)}

Karol Radziuk

Friday 27 August 2010 5:25:10 am

OK, I found. There is another file to this: paymentgateways.ini

{$me|attribute(show,1)}

Chris Williams

Monday 20 September 2010 1:16:04 am

Hey, seeing that almost a month has passed. How did you get on?

I too am looking at the payment gateway system and so far have concluded that the ezauthroize doesnt work. Which is backed up with the following insight.

http://projects.ez.no/ezauthorize/forum/general/ez4_3_ini_update_errors_incompatible_with_4_3#msg25631

I can see in your code you were just getting it to return a success, but did you manage to get the middle stage of communicating with paypal or creating a form for the user to fill out their details?

Heath

Thursday 21 October 2010 5:28:42 pm

Well Hello Chris,

I'm sorry but as a new eZ Community member you are sadly miss informed.

Any user who would take the time to read the latest svn trunk

for the ezauthorize extension would see that it is indeed

compatible with eZ Publish 4.x (4.1,4.2,4.3,4.4)

eZ Authorize does work, very well in fact. Use the latest version (from svn)!

http://svn.projects.ez.no/ezauthorize/trunk/ezauthorize/

Cheers,

Heath

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

Nicolas Pastorino

Monday 25 October 2010 11:11:33 am

Hi Chris,

Putting it in other words, understanding you might not be scanning the SVN repository of all extensions, you should give a try to the trunk Heath pointed to.

Let us know if this gets you up & running again,
Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

eZ debug

Timing: Jan 18 2025 05:06:38
Script start
Timing: Jan 18 2025 05:06:38
Module start 'content'
Timing: Jan 18 2025 05:06:38
Module end 'content'
Timing: Jan 18 2025 05:06:39
Script end

Main resources:

Total runtime0.8849 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 588.8281180.8359
Module start 'content' 0.00690.7265 769.6641672.4766
Module end 'content' 0.73340.1514 1,442.1406341.0625
Script end 0.8848  1,783.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4984210.0002
Check MTime0.00160.1774210.0001
Mysql Total
Database connection0.00150.171110.0015
Mysqli_queries0.790089.27542080.0038
Looping result0.00250.28192060.0000
Template Total0.854496.620.4272
Template load0.00210.235320.0010
Template processing0.852396.313220.4261
Template load and register function0.00010.010810.0001
states
state_id_array0.00100.114410.0010
state_identifier_array0.00090.106220.0005
Override
Cache load0.00190.2140500.0000
Sytem overhead
Fetch class attribute can translate value0.00150.169150.0003
Fetch class attribute name0.00140.162790.0002
XML
Image XML parsing0.00200.221250.0004
class_abstraction
Instantiating content class attribute0.00000.0027110.0000
General
dbfile0.00260.2911400.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 9

Time used to render debug report: 0.0002 secs