This shows why you should not always trust the information you receive on a public forum.
PCI Compliance is not something to take lightly, however keep in mind that there is several levels of PCI Compliance, which one you need to be compliant towards depends what you try to do. Getting a shared hosting account PCI Compliant to process credit cards through an merchant like First Data or Authorize.net and so on (i.e. that the information is entered on your side and then forwarded to the merchant for processing by API) is basically impossible, as very few hosts want to start doing the modifications to the system to make it compliant with the scans required to be PCI Compliant at that level, or even if the scans picks up false positives you will have problems getting that information from the support so you can provide it to the company doing the scan.
If you plan processing by taking cards on your side and then sending it over to the merchant by API, the cheapest solution you can go for would be a small VPS system, or a fully hosted cloud system.
On the other side if you plan to process by sending people over to for example Paypal, you dont need to be PCI Compliant at all.
It is also important to remember if you accept credit card information through your side, there is also rules regarding that you need to handle that data at once, without any storing on your side and so on.
To answer your initial question, what you actually track is the transaction id. First you will have an order id for this order, so you will send that one over to the merchant system (it being Paypal, First Data or any other) this way you can track this payment towards this order. Then when you get a reply from the merchant system, you will know what order the reply is for (some systems are instant i.e. API or not instant i.e. IPN). Then if the order is successful you link the order with the transaction, if its not you would not mark it as paid. I would also recommend you keep a transaction record of both successful and failed payment attempts towards the orders, as that allow you to see if a customer tried to make a payment but failed, and why it failed etc.