Hoping someone here can spot the problem, so here goes.
As standard, the TX Code is rather ugly, so when the customer gets to the SagePay 'Complete Order' page (as well as in the My Sage Pay reports), the order is shown as something like this:
Transaction Reference : dafb64cf2c5aeef1fc89c52367203ec5_82483
This is rather ugly, and has absolutely no reference to the customer, or their order - so reconciliation isn't exactly easy.
I would like to change the TX Code to begin with the 'Order ID' if possible, so:
Code: Select all
'VendorTxCode' => $_COOKIE['SHOP_ORDER_TOKEN'] . "_" . rand(1,100000),
Code: Select all
'VendorTxCode' => $orderId. "_" .$_COOKIE['SHOP_ORDER_TOKEN'],
Code: Select all
'VendorTxCode' => $GLOBALS['orderId']. "_" .$_COOKIE['SHOP_ORDER_TOKEN'],
Transaction Reference : _dafb64cf2c5aeef1fc89c52367203ec5
Note the Order ID is missing and shows no value at all.
So my question is, how do I reference the OrderID in this manner? I am assuming that, because the Order is already generated (can be seen in Incomplete Orders), the orderid must also be generated, but I'm not sure on how to get this to generate in this location.
Any ideas?
Thanks
Grant