Before I quit and throw in the towel on ZC. Let me revisit what we know to date with this exercise...
-
We know the payment module works and is sending the remotely hosted payment solution a unique order number created by Zen from the payment module code.
-
We know the remotely hosted payment gateway is cleanly returning this order number value back to Zen.
-
We know OSCommerce handles it perfectly. We know Zen doesn't.
OK, so lets look at whats different between OSC and Zen at the final stage - and here I think rests the problem.
OSC receives everything back from a remotely hosted payment gateway with checkout_process.php. This file itself also formats the order confirmation email. So, being the receiving file it will naturally be able to read and slot in the unique order number value being returned to it from the gateway. Which it does and the order confirmation emails go out with the correct unique order numbers as passed back to it from the gateway. All is sweet.
Now, like OSC, Zen receives everything back from the remotely hosted payment gateway through checkout_process.php. BUT the confirmation email is formatted by order.php. This is another file.
This makes me think that maybe Zen's checkout_process.php is actually successfully reading the returned value (just as OSC does) but because the email is formatted by aother php file, it is not being passed from checkout_process.php to order.php.
In my mind thia would explain it. Zen's order.php does not actually have that value passed to it so how would it know what $ord means when formatting the confirmation email.
I'm going to try and work out how to capture the value in order_process.php and have it sent or recognised by order.php. This is my train of thought at the moment, please get back to me if you think I'm off the rails.
Thanks