Checkout / Payment is being handled entirely by a 3rd Party. What would be the correct process to mark an Order as Paid via a custom Craft plugin?
The Order will already have been converted from a Cart to an Order and assigned an Order Status via a previous step.
The 3rd Party will be calling a series of API endpoints exposed by a custom Craft plugin to process the various steps of the Order.
EDIT: For future reference, base on Luke's answer below, this is the code I got to work...
$orderNumber = "XXXX-XXXX-XXXX-XXXX"; $order = craft()->commerce_orders->getOrderByNumber($orderNumber); $transaction = craft()->commerce_transactions->createTransaction($order); $transaction->status = Commerce_TransactionRecord::STATUS_SUCCESS; $transaction->type = Commerce_TransactionRecord::TYPE_PURCHASE; craft()->commerce_transactions->saveTransaction($transaction); craft()->commerce_orders->updateOrderPaidTotal($order);