SHOP - How to see my payment gateway in orderview ?

Author Message

Fabien Mas

Wednesday 17 June 2009 9:08:23 am

Hi
I let my customer choose between 2 differents payment gateways.
I would like to show in the orderview page the selected gateway
How can I show this information ? Is there a fetch operator for this ?

Thx
Fabien

Heath

Wednesday 17 June 2009 1:09:56 pm

Sadly,

I do not think this is a default feature in eZ publish.

But ... I have seen this done with custom php code added to eZ publish.

The custom code would store information about the order's payment gateway transaction within the order itself in an unused field with information regarding the payment gateway transaction and that information was later displayed to the admin / user through a template operator.

So it is possible to do with eZ publish with not too much additional code but it requires custom development for your two payment gateways to uniformly store this information in an extra field in the order object in order to later display information based on it.

I think ezauthorize happens to store information in the way I describe which would provide for that feature but I'm not certain it provides the display feature you describe, one could add an additional field to the information stored and then write an operator to retrieve this value for a given order.

I hope these ideas help.

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

Fabien Mas

Thursday 18 June 2009 12:41:13 am

Thanks Heath,
It works

What I have made :
in my own eZPaymentCallbackChecker, in the handleResponse function

....
	$orderID = $this->callbackData['orderID'];
	$order = eZOrder::fetch($orderID);
	$paymentInfos  = "Reference :  ...";
	$order->setAttribute('data_text_2', $paymentInfos);
	$order->store();
...

in my own orderview template

	{$order.data_text_2}

Note : I have first use data_text_1 but the account informations are stored in it so ..

Heath

Thursday 18 June 2009 7:30:47 am

Congratulations,

Indeed you have found the answer. I'm impressed.

Notice folks that he used the second 'unused' field
in the order instead of adding his text string into
the first field which stores multiple records in xml
format.

In this way he will not incur any conflict storing
a single string as the second field is completely
'unused' by eZ Publish by default leaving it's
purpose to be decided by the rules and conventions
of your own application.

FYI. I do recommend storing the information
in question in xml format for flexibility
(more than one value stored).

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

Fabien Mas

Thursday 18 June 2009 8:46:43 am

Well it was quite easy because I was working from the eZSips extension (http://ez.no/fr/developer/contribs/workflow/ezsips__1)
Martin Harispuru (eZSips author) has already implemented this part of code, but I didn't look at it before

Here is my own contribution eZSPPlus
http://ez.no/fr/developer/contribs/workflow/ezspplus

Thanks for your advices

Fabien

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