Know when an order has been paid I need to export some order data to a CSV file. One field is the date (d-m-Y) when the order has been paid. I have search in hook_commerce_*, in the database, but I have not find anything that can help me. Is this data saved in the database, or I need to create a rule that saves this information when the order is payed in full the first time?
I needed to do this in the past. I exported with a View, and used a Representative payment transaction relationship, using Commerce Payment Transaction: Status as the representative sort criteria. Then I just added the Commerce Payment Transaction: Created date field. Assuming that the entire payment is done in one go, I think this method's sound.