This thread is superb, first of all - easily the single most informative thread on 2CheckOut use with VM ...
However, while everything here works, I continue to encounter a specific problem.
The script replacement compiled from this thread and provided by nome works perfectly (NB: if you replace the purchase link with
https://www.2checkout.com/checkout/spurchase instead of
https://www2.2checkout.com/2co/buyer/purchase, you can use the 2CO single page checkout - much better!)
However, on the passback from 2CO, problems occur.
Initially, I was receiving 403 errors, but these were rectified by doing some security clearance for VM.
Then I encountered a new problem: "Order ID is not set or emtpy!"
(NB: The spelling is built-in to the VM code - I haven't tracked it down yet, but that's not a major concern for me right now)
In looking at the URL returned by 2CO, we get the following info:
http://www.MYSITE.com/2checkout_notify.php?x_address=22MyStreet
&x_Address=22MyStreet
&x_email_merchant=TRUE
&x_city=MyCity
&x_first_name=Joe
&x_State=XX
&x_trans_id=1234567890
&x_ship_to_country=GBR
&order_number=1234567890
&x_ship_to_first_name=Joe
&x_email=joe%40hisemail.com
&lang=en
&x_login=123456
&x_2checked=Y
&x_Zip=123ZIPCODE
&x_ship_to_zip=123ZIPCODE
&x_ship_to_company=MYCOMPANY
&x_last_name=Bloggs
&x_ship_to_city=MyCity
&x_ship_to_address=22MyStreet
&x_country=GBR
&x_fax=
&fixed=Y
&x_state=XX
&x_zip=123ZIPCODE
&x_Phone=12345678
&x_Country=GBR
&x_ship_to_last_name=Bloggs
&x_Email=joe%40hisemail.com
&merchant_order_id=
&ip_country=United+Kingdom
&x_MD5_Hash=HASHASHASHASHAHAHAHAHA
&x_company=MYCOMPANY
&demo=Y
&pay_method=CC
&x_phone=12345678
&x_invoice_num=10
&x_ship_to_state=XX
&x_response_code=1
&x_amount=15.00
&x_City=MyCity
&x_Login=123456
&x_receipt_link_url=http%3A%2F%2Fwww.MYSITE.com%2F2checkout_notify.php
&card_holder_name=Joe++Bloggs
As you can see, there is no order_id. Also note that merchant_order_id is blank when sent back from 2CO.
Now, assuming that x_2checked=Y is understood, I would have assumed that x_invoice_num would have been interpreted as order_id somewhere between 2checkout_notify.php, checkout.2Checkout_result.php, and ps_order.php. But this is not the case ...
The net result of this issue is that Orders go through the VM system, are paid for at 2CO, but when the customer checks their orders on-site, they are greeted with a Pending Status (regardless of what has been set in the 2CO payment method configuration), and a link to pay for their order.
Not ideal at all ...
Looking through this forum, it is clear that the 2CheckOut Payment method is both rarely used, and any problems relating to it are rarely addressed (at least, rarely answered with a solution; they are usually answered with more questions or a cry of "me too!")
The Payment method script provided by VM for 2CO was an absolute non-starter for me, giving me all manner of errors, and failing to reach 2CO at all ... I got server 500 errors most of the time ...
Searching via Google for any kind of resolution to this or similar issues seems to lead straight to open requests on freelancer forums and so forth ... I know that, like many, my budget is not going to stretch to paying someone to fix this issue ... but the question is: why is this an issue at all?

My shop will - hopefully - provide both physical and downloadable goods ...
But use of 2CheckOut seems to be a dead end when coupled with VM. Considering I've used 2CO for around 4 years or so, without too much trouble I have to say, I would like to continue using them and their services (I have always found their Customer Support to be excellent).
The idea of switching to PayPal at this point, or any other payment processor for that matter, is distinctly unappealing ...
So ... long questions short: has anyone managed to get the 2checkoutnotify.php script, placed in the site root, to function correctly with the 2CO checkout process using the script provided by nome in this thread?
Did anyone encounter a similar order_id missing issue? Or another issue?
It would be nice to solve this once and for all, instead of having potential users of both 2CO and VM wandering from forum to forum and repeatedly searching the same things for hours - or, as in my case - days on end ...
Thanks!