ezorder object data_text_2 behaves mysteriously

Author Message

zurgutt -

Friday 07 December 2007 3:28:18 am

Im working to make paynet payment gateway to work for client. It works in usual way, with redirection to paynet site to enter card data, after which paynet site makes http call back to module that sets order status to paid.

One field in this callback is card type used, eg. Visa/Master. Now, i have modified the module that receives it to save that data in ezorder data_text_2 and it is supposed to be used in a confirmation mail to shop toshow which card was used.

However in ezshopoperationcollection.php where confirmation mail is sent, the data_text_2 field is empty. I also added debug of $order to orderview page that comes up after user is back from paynet site and payment is verified, and its empty there too.

BUT if i then reload the orderview page, it will be there!

I have been running headfirst into this for a day and really need to figure out really urgently whats going on there. Any suggestions appreciated.

Certified eZ developer looking for projects.
zurgutt at gg.ee

zurgutt -

Friday 07 December 2007 5:47:33 am

Finally figured it out.

In paynet callback script call for approvePayment() occurred before setting the order attribute. Somehow i imagined it just marks order as paid but apparently other routines are called from within it too, including sending emails.

How this could affect order view is still mystery for me though.

Thanks for everyone who helped.

Certified eZ developer looking for projects.
zurgutt at gg.ee

Bjørn Reiten

Friday 07 December 2007 7:13:09 am

Hi,

I think if you look at the function approvePayment() in the file kernel/shop/classes/ezpaymentcallbackchecker.php, the function will return a function call to continueWorkflow(), which will continue on the functionlist described in the file:

kernel/shop/operation_definition.php -> $OperationList['checkout'] ...

which will activate the order and send emails and run the rest of the workflows.

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