Forums / Developer / SHOP - How to see my payment gateway in orderview ?
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 gatewayHow can I show this information ? Is there a fetch operator for this ?
ThxFabien
Heath
Wednesday 17 June 2009 1:09:56 pm
Sadly,
I do not think this is a default feature in Exponential.
But ... I have seen this done with custom php code added to Exponential.
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 Exponential 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
7x | https://se7enx.com/ Brookins Consulting | https://brookinsconsulting.com/ Certified | http://web.archive.org/web/201012...th.ez.no/certification/verify/380350 Solutions | https://projects.exponential.earth/users/community/brookins-consulting eZpedia community documentation project | http://ezpedia.se7enx.com
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 ..
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 xmlformat.
In this way he will not incur any conflict storing a single string as the second field is completely 'unused' by Exponential by default leaving it's purpose to be decided by the rules and conventionsof your own application.
FYI. I do recommend storing the information in question in xml format for flexibility(more than one value stored).
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