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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:42:13
Script start
Timing: Jan 18 2025 11:42:13
Module start 'layout'
Timing: Jan 18 2025 11:42:13
Module start 'content'
Timing: Jan 18 2025 11:42:14
Module end 'content'
Timing: Jan 18 2025 11:42:14
Script end

Main resources:

Total runtime0.7568 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.0469152.6250
Module start 'layout' 0.00580.0032 741.671939.4453
Module start 'content' 0.00890.7464 781.1172667.3984
Module end 'content' 0.75530.0014 1,448.515620.1641
Script end 0.7568  1,468.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4224160.0002
Check MTime0.00140.1832160.0001
Mysql Total
Database connection0.00080.103310.0008
Mysqli_queries0.681990.1070710.0096
Looping result0.00080.1038690.0000
Template Total0.726296.020.3631
Template load0.00230.302220.0011
Template processing0.723995.659320.3620
Template load and register function0.00010.017310.0001
states
state_id_array0.00100.135110.0010
state_identifier_array0.00090.113120.0004
Override
Cache load0.00200.2697500.0000
Sytem overhead
Fetch class attribute can translate value0.00080.099240.0002
Fetch class attribute name0.00160.211090.0002
XML
Image XML parsing0.00310.407640.0008
class_abstraction
Instantiating content class attribute0.00000.0034110.0000
General
dbfile0.00250.3260290.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs