Database update on checkout_success.php page
I'm in the process of creating a web site using eCart 5 for the eCommerce functionality.
I've used the wizard to create the relevant pages for the process, with the confirm page adding the the order summary and order details to the database before going to Paypal for payment processing.
Once this is completed, Paypal should send things back to the checkout_success.php page.
What I'm struggling with is how I go about getting the order status updated in the database. If they reach the success page I want the order process to be updated to Paid as opposed to processing.
Obviously I need to be able to update the correct record in the database, but where do I get the relevant OrderID value from to be able to pass this to the Update behaviour?
Any help appreciated.