Share » Forums » Developer » howto not delete eZPaymentObject

howto not delete eZPaymentObject

howto not delete eZPaymentObject

Monday 22 June 2009 8:46:11 am - 2 replies

Author Message

Heath

Monday 22 June 2009 2:00:29 pm

Hello,

Ahh email notification containing payment method. This is a common request. Though I imagine you'll solve it differently than others.

Most payment gateways (like say the default ezredirectgateway) includes a 'cleanup' function which appears to remove the eZPaymentObject from the system when called.

I would need to know what payment gateway you are using in order to tell you how to disable this call accurately. The objects appear to be removed after the customer is redirected back from the payment gateway service provider (after entering customer payment information securely).
Exaqmple

See: <i>http://pubsvn.ez.no/nextgen/trunk/kernel/shop/classes/ezredirectgateway.php</i>

    /*!
    Removes temporary eZPaymentObject from database.
    */
    function cleanup( $process, $event )
    {
        //__DEBUG__
        $this->logger->writeTimedString("cleanup");
        //___end____

        $paymentObj = eZPaymentObject::fetchByProcessID( $process->attribute( 'id' ) );

        if ( is_object( $paymentObj ) )
        {
            $paymentObj->remove();
        }
    }

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

Sylvain Gogel

Tuesday 29 September 2009 6:04:40 am

Hey, sorry i'm late to answer

Pb is still up to date, Actualy i'm using two custom built payment gateway

i hope i only have to override the cleanup method. Will keep you in touch

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu