/** * can run step once order has been submitted. * NOTE: must have a payment (even if it is a fake payment). * The reason for this is if people pay straight away then they want to see the payment shown on their invoice. * @param DataObject $order Order * @return Boolean **/ public function initStep($order) { if ($order->IsSubmitted()) { if ($payments = $order->Payments()) { if ($payments->count()) { return true; } } } return false; }