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.

eZ debug

Timing: Jan 18 2025 16:09:10
Script start
Timing: Jan 18 2025 16:09:10
Module start 'layout'
Timing: Jan 18 2025 16:09:10
Module start 'content'
Timing: Jan 18 2025 16:09:10
Module end 'content'
Timing: Jan 18 2025 16:09:10
Script end

Main resources:

Total runtime0.0159 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.0469152.6406
Module start 'layout' 0.00620.0025 740.687539.4766
Module start 'content' 0.00870.0050 780.164193.4922
Module end 'content' 0.01380.0021 873.656338.3047
Script end 0.0158  911.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002817.6945140.0002
Check MTime0.00117.1216140.0001
Mysql Total
Database connection0.00095.755510.0009
Mysqli_queries0.002616.104730.0009
Looping result0.00000.087110.0000
Template Total0.00169.810.0016
Template load0.00095.736010.0009
Template processing0.00064.017210.0006
Override
Cache load0.00064.048710.0006
General
dbfile0.00021.528280.0000
String conversion0.00000.055540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs