completedOrder method
Implementation
void completedOrder(String orderId) {
final order = orderRepository.findById(orderId);
order.complete();
loyaltyPort.addPoints(
customerId: order.customerId,
orderId: orderId,
orderAmount: _calculateOrderAmount(order),
);
order.markLoyaltyApplied();
orderRepository.update(order);
}